mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-08-02 00:17:02 +00:00
28 lines
724 B
Objective-C
28 lines
724 B
Objective-C
//
|
|
// 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;
|
|
|
|
//the completion is only called if the operation wasn't cancelled
|
|
- (void) setCompletion:(BITNetworkCompletionBlock) completionBlock;
|
|
|
|
@property (nonatomic, readonly) NSHTTPURLResponse *response;
|
|
@property (nonatomic, readonly) NSData *data;
|
|
@property (nonatomic, readonly) NSError *error;
|
|
|
|
@end
|