objective-c - IOS AFN POST请求 Code=-1011 internal server error (500)。
高洛峰
高洛峰 2017-04-18 09:33:13
0
2
1404

code如下:

AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];

NSDictionary *dic = @{@"model":@"b",@"token":@"bb",@"ShopName":@"bbb"};

[manager POST:@"http://masterhouse.cn/api/api.asmx?op=OnStartLook" parameters:parameters progress:^(NSProgress * _Nonnull uploadProgress) {
   
    
} success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
    NSLog(@"%@",responseObject);
    
} failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
    NSLog(@"%@",error);
}];

错误信息:
Error Domain=com.alamofire.error.serialization.response Code=-1011 "Request failed: internal server error (500)" UserInfo={NSUnderlyingError=0x7fd4725279a0 {Error Domain=com.alamofire.error.serialization.response Code=-1016 "Request failed: unacceptable content-type: application/soap+xml" UserInfo={com.alamofire.serialization.response.error.response=<NSHTTPURLResponse: 0x7fd472526570> { URL: http://masterhouse.cn/api/api.asmx?op=OnStartLook } { status code: 500, headers {
"Cache-Control" = private;
"Content-Length" = 506;
"Content-Type" = "application/soap+xml; charset=utf-8";
Date = "Fri, 26 Aug 2016 08:30:47 GMT";
Server = "Microsoft-IIS/7.0";
"X-AspNet-Version" = "4.0.30319";
"X-Powered-By" = "ASP.NET";

}

百度谷歌stackoverflow哪里都找遍了,但都没解决,跪舔大触帮帮忙

高洛峰
高洛峰

拥有18年软件开发和IT教学经验。曾任多家上市公司技术总监、架构师、项目经理、高级软件工程师等职务。 网络人气名人讲师,...

membalas semua(2)
小葫芦

Semak pelayan

伊谢尔伦

Sepatutnya Jenis Kandungan tidak ditetapkan, dan format permintaan dan sebagainya tidak ditetapkan. 500 juga boleh menjadi kesalahan pelayan. Inilah masalah yang saya lihat, harap ia membantu.

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