对NSURLRequest的cURL命令

时间:2010-06-19 20:45:18

标签: php iphone curl nsurlconnection nsurlrequest

我想转换cURL命令:

curl -F'access = xxxx'\      -F'消息=你好。' \      -F'picture=@1.jpg'\      https://example.com

到NSURLRequest。

有人可以帮帮我吗?

1 个答案:

答案 0 :(得分:0)

如果你想用POST数据创建一个请求,我建议你使用ASIHTTPRequest:http://allseeing-i.com/ASIHTTPRequest

它非常强大且易于使用,您应该查看ASIFormDataRequest类(请参阅如何使用部分)。

我从来没有将它用于SSL连接,但我很确定它是可能的。