我在我的应用中使用了AFNetworking。
当我使用带有字段EMAIL的AFN时出现此错误:
Error: Error Domain=AFNetworkingErrorDomain Code=-1011 "Request failed: not found (404)" UserInfo=0x1096634a0 {NSLocalizedDescription=Request failed: not found (404), NSErrorFailingURLKey=http://mywebservice/vlemail?email=me%40domain.com, AFNetworkingOperationFailingURLResponseErrorKey=<NSHTTPURLResponse: 0x109558d10> { URL: http://mywebservice/vlemail?email=me%40domain.com } { status code: 404, headers {
Connection = "keep-alive";
"Content-Length" = 967;
"Content-Type" = "text/html;charset=utf-8";
Date = "Mon, 28 Apr 2014 19:01:43 GMT";
Server = "nginx admin";
} }, NSUnderlyingError=0x1096756e0 "Request failed: unacceptable content-type: text/html"}
很奇怪,因为字段EMAIL是: NSLog(@&#34; txtEmail。:%@&#34;,_ txtEmail.text)= [2908:60b] txtEmail:me @ domain
但AFN的参数更改为:me%40domain
有人知道为什么吗?
非常感谢!