ASIHttpRequest call Restful web service?

十年热恋 提交于 2019-12-25 06:44:27

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!