UnS*_*aid 5 iphone nsurlconnection nsmutableurlrequest ios http-delete
我需要如何发送http删除请求,我已经实现了下面的代码
- (void) deleteSyncRequestWithURL:(NSString *) url
{
NSMutableURLRequest *request = [[[NSMutableURLRequest alloc] init] autorelease];
[request setURL:[NSURL URLWithString:url]];
[request setHTTPMethod:@"DELETE"];
_connection = [[NSURLConnection connectionWithRequest:request delegate:self] retain];
}
Run Code Online (Sandbox Code Playgroud)
但我有404状态.
有谁知道我错过了什么?
PS:我正在使用xcode 3.2.3,模拟器4.0
| 归档时间: |
|
| 查看次数: |
5287 次 |
| 最近记录: |