Search code examples
iosiphonecurlafnetworking-2

AFNetworking iOS add curl


I would like to add curl -H "Accept: application/json" to request that Iam sending thru AFNetworking on ios. I don't know how to add it. Thanks


Solution

  • you have to added this text in AFURLResponseSerialization.m file

    self.acceptableContentTypes = [NSSet setWithObjects:@"application/json", @"text/json", @"text/javascript",@"text/plain",@"text/html", nil];