provide access to the response

e.g. http status codes
This commit is contained in:
Stephan Diederich 2013-08-15 22:27:49 +02:00
parent a530df813d
commit 447d850207
2 changed files with 2 additions and 0 deletions

View File

@ -19,6 +19,7 @@ typedef void (^BITNetworkCompletionBlock)(BITHTTPOperation* operation, id respon
- (void) setCompletion:(BITNetworkCompletionBlock) completionBlock;
@property (nonatomic, readonly) NSHTTPURLResponse *response;
@property (nonatomic, readonly) NSData *data;
@property (nonatomic, readonly) NSError *error;

View File

@ -68,6 +68,7 @@
#pragma mark - NSURLConnectionDelegate
-(void)connection:(NSURLConnection*)connection didReceiveResponse:(NSURLResponse*)response {
_data = [[NSMutableData alloc] init];
_response = (id)response;
}
-(void)connection:(NSURLConnection*)connection didReceiveData:(NSData*)data {