IOS AFNetworking2.0 Issues

Source: Internet
Author: User

1. Error domain=afnetworkingerrordomain code=-1011 "Request failed:not found (404)" userinfo=0x86811c0 { Nserrorfailingurlkey=http://192.168.6.77:8080/demo/rest/demo/getapplicationlist, NSLocalizedDescription=Request Failed:not found (404), Nsunderlyingerror=0x8843ce0 "Request failed:unacceptable content-type:text/html", Afnetworkingoperationfailingurlresponseerrorkey=<nshttpurlresponse:0x8844bd0>}afnetworking 2.0 default does not support text/ HTMLAFURLRESPONSESERIALIZATION.M-self.acceptablecontenttypes = [Nsset setwithobjects:@ "Application/json", @ " Text/json ", @" Text/javascript ", nil]; Add @ "text/html". Request header to error, Self.acceptablecontenttypes = [Nsset setwithobjects:@ "Application/json", @ "Text/json", @ "text  /javascript ", @" text/html ", @" Text/plain ", nil]; 4 floor has been solved, add @ "text/html" to the line, or write code//Initialize Manage manager = [Afhttprequestoperationmanager manager];//set the request header Contenttyp ES information manager.responseSerializer.acceptableContentTypes = [Manager.responseSerializer.acceptableContentTypes setbyaddingobject:@ "text/html"], also can to 2,-[__nscfdictionary bytes]: Unrecognized see below Responobject is already nsdictionary, So no more parsing





IOS AFNetworking2.0 Issues

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.