使用iOS5的自定义请求方法 [英] Consuming Custom Request Methods with iOS5
问题描述
关于使用Android自定义请求方法的原始问题似乎很少受到关注 - 我已将其转换为Android特定问题
My original question regarding Consuming Custom Request Methods with Android seems to have garnered very little attention -- I have converted it to an Android specific question
因此,非常简单,使用iOS5开发,是否可以使用自定义请求方法?
So, quite simply, with iOS5 development, is it possible to consume custom request methods?
如果是这样,怎么做。
If so, how.
标准请求方法集,按照 RFC-2616 是:
The "standard" set of request methods, as per RFC-2616 are:
- GET
- PUT
- POST
- DELETE
- TRACE
- CONNECT
- GET
- PUT
- POST
- DELETE
- TRACE
- CONNECT
我想添加另一个,名为 SEARCH
。在API上,使用PHP或Java,这很容易在PHP中实现。对于iOS开发人员而言,这种新请求方法的使用被证明是一个挑战。
I would like to add another, called SEARCH
. On the API, using PHP or Java, this is easy to implement in PHP. The consumption of this new request method is proving to be a challenge for an iOS developer.
是否有人对可支持自定义请求方法的工作示例或框架有任何引用,例如 SEARCH
,或 FOOBAR
?
Does anyone have any references to working examples or frameworks that will support a custom request method, such as SEARCH
, or FOOBAR
?
推荐答案
ASIHTTPRequest允许它: http://allseeing-i.com/ASIHTTPRequest/How-to-use
ASIHTTPRequest allows it: http://allseeing-i.com/ASIHTTPRequest/How-to-use
查看'PUT请求和自定义POST的部分。
Check out the 'PUT requests and custom POSTs' section.
[request setRequestMethod:@"SOME_REQUEST_METHOD"];
这篇关于使用iOS5的自定义请求方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!