Last active
December 21, 2015 10:38
-
-
Save yasirmturk/6292786 to your computer and use it in GitHub Desktop.
Log the complete ASIHTTPRequest HTTP Request
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
/* | |
* Log the complete ASIHTTPRequest HTTP Request | |
*/ | |
+ (void)logRequest:(ASIHTTPRequest *)request{ | |
NSLog(@"url:%@", request.url); | |
NSLog(@"method:%@", request.requestMethod); | |
NSLog(@"head:%@", request.requestHeaders); | |
if (request.postLength > 0) { | |
NSLog(@"body:%@", [[NSString alloc]initWithBytes:[request.postBody bytes] length:request.postLength encoding:NSUTF8StringEncoding]); | |
} | |
NSLog(@"responseString:%@", request.responseString); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment