This repository has been archived by the owner on Jan 17, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 202
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
optimization: when responseSerializer is set a AFHTTPResponseSerializ…
…er instance
- Loading branch information
leleliu008
committed
Jun 8, 2018
1 parent
2fba9eb
commit ddb7550
Showing
1 changed file
with
16 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
when responseSerializer is set a AFHTTPResponseSerializer instance, the responseObject is NSData Type, in fact, the response body may be xml、html、x-www-form-urlencoded or other text format, in this case , we can according to Content-Type response header determine whether the response body is text, if the response body is text, we convert it to NSString to print it, beasuse it looks better.