-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement -debugDescription for Request and Response #76
Conversation
Review: @rastersize, @8W9aG, @jgavris |
Cast enumeration to `long` for a -stringWithFormat: in `-debugDescription` of SPTDataLoaderRequest.
You'll need to add tests for this (in order to keep coverage up) |
@@ -181,4 +181,10 @@ - (NSDate *)retryAfterForHeaders:(NSDictionary *)headers | |||
return [httpDateFormatter dateFromString:retryAfterValue]; | |||
} | |||
|
|||
- (NSString *)debugDescription | |||
{ | |||
return [NSString stringWithFormat:@"%@ { URL: %@ } { status code: %lu, headers: %@ }", [super debugDescription], self.response.URL, (long)self.statusCode, self.responseHeaders]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You've specified that the status code should be long unsigned
but you then cast it to only long
.
With some tests and the type fix this will be golden 😃 |
Implement unit tests for debugDescription methods of SPTDataLoaderRequest and SPTDataLoaderResponse.
Good catch, @rastersize. Changed them to |
👍 |
Implement -debugDescription for Request and Response
hooray! 🎉 |
Can also use |
Implement
-debugDescription
methods forSPTDataLoaderRequest
andSPTDataLoaderResponse
.Format of the output is the same as
NSURLResponse
andNSURLRequest
.