- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data
{
NSLog(@"%@----%@-----%@---%@",connection.currentRequest.URL,connection.currentRequest.HTTPBody,connection.currentRequest.HTTPMethod,connection.currentRequest.allHTTPHeaderFields);
}
輸出結果如下
http://這裡是網址/zines----(null)-----GET---
{
Accept = "application/json";
"Content-Length" = 0;
"Content-Type" = "application/json";
}
為什麼用xcode 就可以得到資料,放到瀏覽器裡就是"Internal Server Error"瀏覽器輸入的地址如下:http://這裡是網址/zines
小白一枚,求大神告知,萬分感謝!!!