No Description

RNFetchBlobNetwork.h 1.2KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. //
  2. // RNFetchBlobNetwork.h
  3. // RNFetchBlob
  4. //
  5. // Created by wkh237 on 2016/6/6.
  6. // Copyright © 2016 wkh237. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. #import "RNFetchBlobProgress.h"
  10. #import "RNFetchBlobFS.h"
  11. #if __has_include(<React/RCTAssert.h>)
  12. #import <React/RCTBridgeModule.h>
  13. #else
  14. #import "RCTBridgeModule.h"
  15. #endif
  16. #ifndef RNFetchBlobNetwork_h
  17. #define RNFetchBlobNetwork_h
  18. @interface RNFetchBlobNetwork : NSObject <NSURLSessionDelegate, NSURLSessionTaskDelegate, NSURLSessionDataDelegate>
  19. + (_Nullable instancetype)sharedInstance;
  20. + (NSMutableDictionary * _Nullable ) normalizeHeaders:(NSDictionary * _Nullable)headers;
  21. + (void) cancelRequest:(NSString * _Nonnull)taskId;
  22. + (void) emitExpiredTasks;
  23. + (void) enableProgressReport:(NSString * _Nonnull) taskId config:(RNFetchBlobProgress * _Nullable)config;
  24. + (void) enableUploadProgress:(NSString * _Nonnull) taskId config:(RNFetchBlobProgress * _Nullable)config;
  25. - (nullable id) init;
  26. + (void) sendRequest:(NSDictionary * _Nullable )options contentLength:(long)contentLength bridge:(RCTBridge * _Nullable)bridgeRef taskId:(NSString * _Nullable)taskId withRequest:(NSURLRequest * _Nullable)req callback:(_Nullable RCTResponseSenderBlock) callback;
  27. @end
  28. #endif /* RNFetchBlobNetwork_h */