问题
Can ASIHttpRequest call Restful web service ? I knew that Restkit is good at it. If no,any easy way to convert ?
Can we say that ASIHttpRequest is good at calling soap based web service ?
Thanks for your comments !
回答1:
ASIHTTPRequest simply does a HTTP request. Nothing more, nothing less. Since REST is also just an HTTP request, you can use ASIHTTPRequest just fine with a restful web service. It doesn't do any parsing of the response, though, so if the response is JSON you still have to parse that yourself.
You can also use ASIHTTPRequest for SOAP but you have to construct the XML by yourself (or using some other library) and parse the XML response by yourself as well. For SOAP you may want to use http://sudzc.com/ instead.
来源:https://stackoverflow.com/questions/7188738/asihttprequest-call-restful-web-service