Iphone ASIHTTPRequest获取状态0,标头为null
我正在使用Iphone ASIHTTPRequest获取状态0,标头为null,iphone,objective-c,asihttprequest,Iphone,Objective C,Asihttprequest,我正在使用ASIHTTPRequest,有时我用来获取响应状态为0,当我打印响应状态标题时,我得到null 这意味着什么?我应该如何通过编程来处理这一点 -(void)requestWentWrong:(ASIHTTPRequest *)request{ NSLog(@"header %@", [request responseHeaders]); NSLog(@"stat code %i", [request responseStatusCode]); } 请求可能由于多种原因而失败-尝
ASIHTTPRequest
,有时我用来获取响应状态为0
,当我打印响应状态标题时,我得到null
这意味着什么?我应该如何通过编程来处理这一点
-(void)requestWentWrong:(ASIHTTPRequest *)request{
NSLog(@"header %@", [request responseHeaders]);
NSLog(@"stat code %i", [request responseStatusCode]);
}
请求可能由于多种原因而失败-尝试记录任何错误,例如:
NSLog("request %@ failed with error @%", request, request.error);
请注意,ASIHTTPRequest已被弃用。你可能想读:;这是否意味着苹果会拒绝我的申请?我以前也尝试过MKNetworkKit,关于它的可用信息较少,在论坛上也没有任何帮助。不,苹果不会因为使用ASIHTTPRequest而拒绝你的应用程序。你可以毫无问题地使用ASIHTTPRequest,这只是为了你的信息。我还没有试过其他选择。