objective-c - NSURLConnection
某草草
某草草 2017-05-02 09:26:12
0
1
531
- (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
小白一枚,求大神告知,万分感谢!!!

某草草
某草草

membalas semua(1)
洪涛

Itulah pengepala, yang disertakan dalam setiap mesej panjang kandungan = 0 bermakna tiada data. Adakah anda pasti permintaan anda berjaya?

Muat turun terkini
Lagi>
kesan web
Kod sumber laman web
Bahan laman web
Templat hujung hadapan