cURL command to NSURLRequest
-
28-09-2019 - |
Question
I want to convert cURL command:
curl -F 'access=xxxx' \ -F 'message=Hello.' \ -F 'picture=@1.jpg' \ https://example.com
to a NSURLRequest.
Can somebody please help me with this?
Solution
If you want to create a request with POST data, I suggest you to use ASIHTTPRequest: http://allseeing-i.com/ASIHTTPRequest
It is quite powerful and easy to use, you should take a look at the ASIFormDataRequest class (see the How To Use section).
I've never used it for SSL connections though, but I'm pretty sure it's possible.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow