mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-07-30 23:20:28 +00:00
provide access to the response
e.g. http status codes
This commit is contained in:
parent
a530df813d
commit
447d850207
@ -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;
|
||||
|
||||
|
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user