From 21e907cb984f29dc2ecdc10cd200eb8fed5caa39 Mon Sep 17 00:00:00 2001 From: Mattt Thompson Date: Mon, 23 Jan 2012 08:35:43 -0800 Subject: [PATCH] Adding -description to AFURLConnectionOperation --- AFNetworking/AFURLConnectionOperation.m | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/AFNetworking/AFURLConnectionOperation.m b/AFNetworking/AFURLConnectionOperation.m index c521bba..f9b7211 100644 --- a/AFNetworking/AFURLConnectionOperation.m +++ b/AFNetworking/AFURLConnectionOperation.m @@ -159,7 +159,7 @@ static inline BOOL AFStateTransitionIsValid(AFOperationState fromState, AFOperat self.runLoopModes = [NSSet setWithObject:NSRunLoopCommonModes]; self.request = urlRequest; - + self.state = AFHTTPOperationReadyState; return self; @@ -191,6 +191,10 @@ static inline BOOL AFStateTransitionIsValid(AFOperationState fromState, AFOperat [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 { [self.lock lock]; if (!block) {