How to send an OPTIONS HTTP Method in iOS?

545 views Asked by At

I am working for a company that has an HTTP OPTIONS method as one of their routes. How do I send an HTTP OPTIONS method in iOS, either using NSMutableURLRequest, AFNetworking, or some other library? Is it possible?

1

There are 1 answers

0
quellish On

NSMutableHTTPURLRequest, which is actually an informal protocol on NSMutableURLRequest, includes this property:

@property (copy) NSString *HTTPMethod;

This is the HTTP request type. You can set this to @"OPTIONS".