- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data
{
NSLog(@"%@----%@-----%@---%@",connection.currentRequest.URL,connection.currentRequest.HTTPBody,connection.currentRequest.HTTPMethod,connection.currentRequest.allHTTPHeaderFields);
}
The output results are as follows
http://这里是网址/zines----(null)-----GET---
{
Accept = "application/json";
"Content-Length" = 0;
"Content-Type" = "application/json";
}
Why can I get the data using xcode? When I put it in the browser, it will show "Internal Server Error". The address entered by the browser is as follows: http://这里是网址/zines
I am a novice, please let me know. Thank you very much. !!!
That is the header, every message has it, content-length = 0 means there is no data. Are you sure your request was successful?