Rumah > Soal Jawab > teks badan
- (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
小白一枚,求大神告知,万分感谢!!!
PHP中文网2017-05-02 09:28:12
Itulah pengepala, yang disertakan dalam setiap mesej panjang kandungan = 0 bermakna tiada data. Adakah anda pasti permintaan anda berjaya?