RCTMultipartDataTask.h 681 B

123456789101112131415161718192021222324252627
  1. /*
  2. * Copyright (c) Facebook, Inc. and its affiliates.
  3. *
  4. * This source code is licensed under the MIT license found in the
  5. * LICENSE file in the root directory of this source tree.
  6. */
  7. #import <Foundation/Foundation.h>
  8. #import <React/RCTMultipartStreamReader.h>
  9. typedef void (^RCTMultipartDataTaskCallback)(
  10. NSInteger statusCode,
  11. NSDictionary *headers,
  12. NSData *content,
  13. NSError *error,
  14. BOOL done);
  15. @interface RCTMultipartDataTask : NSObject
  16. - (instancetype)initWithURL:(NSURL *)url
  17. partHandler:(RCTMultipartDataTaskCallback)partHandler
  18. progressHandler:(RCTMultipartProgressCallback)progressHandler;
  19. - (void)startTask;
  20. @end