Adding -description to AFURLConnectionOperation
This commit is contained in:
parent
83afa2c734
commit
21e907cb98
1 changed files with 5 additions and 1 deletions
|
|
@ -159,7 +159,7 @@ static inline BOOL AFStateTransitionIsValid(AFOperationState fromState, AFOperat
|
||||||
self.runLoopModes = [NSSet setWithObject:NSRunLoopCommonModes];
|
self.runLoopModes = [NSSet setWithObject:NSRunLoopCommonModes];
|
||||||
|
|
||||||
self.request = urlRequest;
|
self.request = urlRequest;
|
||||||
|
|
||||||
self.state = AFHTTPOperationReadyState;
|
self.state = AFHTTPOperationReadyState;
|
||||||
|
|
||||||
return self;
|
return self;
|
||||||
|
|
@ -191,6 +191,10 @@ static inline BOOL AFStateTransitionIsValid(AFOperationState fromState, AFOperat
|
||||||
[super dealloc];
|
[super dealloc];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (NSString *)description {
|
||||||
|
return [NSString stringWithFormat:@"<%@: %p, state: %@, cancelled: %@ request: %@, response: %@>", NSStringFromClass([self class]), self, AFKeyPathFromOperationState(self.state), ([self isCancelled] ? @"YES" : @"NO"), self.request, self.response];
|
||||||
|
}
|
||||||
|
|
||||||
- (void)setCompletionBlock:(void (^)(void))block {
|
- (void)setCompletionBlock:(void (^)(void))block {
|
||||||
[self.lock lock];
|
[self.lock lock];
|
||||||
if (!block) {
|
if (!block) {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue