Afnetworking: How can i get responseString which at AFNetworking 3.0 .

Created on 23 May 2016  ·  5Comments  ·  Source: AFNetworking/AFNetworking

like operation.responseString ..

Most helpful comment

NSError *underError = error.userInfo[@"NSUnderlyingError"];
NSData *responseData = underError.userInfo[@"com.alamofire.serialization.response.error.data"];

All 5 comments

Sometimes, the server returns an invalid JSON format, I need to know what is responseString, but i can't find it in the AFNetworking 3.0

NSError *underError = error.userInfo[@"NSUnderlyingError"];
NSData *responseData = underError.userInfo[@"com.alamofire.serialization.response.error.data"];

@Mekor thank you !

How do you actually get the raw response string in the success callback?

只有error的的描述。没有operation.responseString.求解啊
How do you actually get the raw response string in the success callback?

Was this page helpful?
0 / 5 - 0 ratings