2016-10-11 12:14:37 -07:00
|
|
|
/**
|
2018-09-11 15:27:47 -07:00
|
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
2016-10-11 12:14:37 -07:00
|
|
|
*
|
2018-02-16 18:24:55 -08:00
|
|
|
* This source code is licensed under the MIT license found in the
|
|
|
|
* LICENSE file in the root directory of this source tree.
|
2016-10-11 12:14:37 -07:00
|
|
|
*/
|
|
|
|
|
|
|
|
#import <Foundation/Foundation.h>
|
2016-11-23 07:47:52 -08:00
|
|
|
|
|
|
|
#import <React/RCTMultipartStreamReader.h>
|
2016-10-11 12:14:37 -07:00
|
|
|
|
|
|
|
typedef void (^RCTMultipartDataTaskCallback)(NSInteger statusCode, NSDictionary *headers, NSData *content, NSError *error, BOOL done);
|
|
|
|
|
|
|
|
@interface RCTMultipartDataTask : NSObject
|
|
|
|
|
2017-08-14 10:54:33 -07:00
|
|
|
- (instancetype)initWithURL:(NSURL *)url
|
|
|
|
partHandler:(RCTMultipartDataTaskCallback)partHandler
|
|
|
|
progressHandler:(RCTMultipartProgressCallback)progressHandler;
|
|
|
|
|
2016-10-11 12:14:37 -07:00
|
|
|
- (void)startTask;
|
|
|
|
|
|
|
|
@end
|