mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-24 07:05:35 +00:00
add networking helpers to BITAuthenticator
* NSOperation-based networking * helpers for URLRequest, operation, getPath:error:
This commit is contained in:
25
Classes/BITHTTPOperation.h
Normal file
25
Classes/BITHTTPOperation.h
Normal file
@@ -0,0 +1,25 @@
|
||||
//
|
||||
// BITHTTPOperation.h
|
||||
// HockeySDK
|
||||
//
|
||||
// Created by Stephan Diederich on 10.08.13.
|
||||
//
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@class BITHTTPOperation;
|
||||
typedef void (^BITNetworkCompletionBlock)(BITHTTPOperation* operation, id response, NSError* error);
|
||||
|
||||
@interface BITHTTPOperation : NSOperation
|
||||
|
||||
+ (instancetype) operationWithRequest:(NSURLRequest *) urlRequest;
|
||||
|
||||
@property (nonatomic, readonly) NSURLRequest *URLRequest;
|
||||
|
||||
- (void) setCompletion:(BITNetworkCompletionBlock) completionBlock;
|
||||
|
||||
@property (nonatomic, readonly) NSData *data;
|
||||
@property (nonatomic, readonly) NSError *error;
|
||||
|
||||
@end
|
||||
Reference in New Issue
Block a user