aliyun-oss-react-native

OSSHttpResponseParser.h 970B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. //
  2. // OSSHttpResponseParser.h
  3. // AliyunOSSSDK
  4. //
  5. // Created by huaixu on 2018/1/22.
  6. // Copyright © 2018年 aliyun. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. #import "OSSConstants.h"
  10. #import "OSSTask.h"
  11. NS_ASSUME_NONNULL_BEGIN
  12. /**
  13. HTTP response parser
  14. */
  15. @interface OSSHttpResponseParser : NSObject
  16. @property (nonatomic, copy) OSSNetworkingOnRecieveDataBlock onRecieveBlock;
  17. @property (nonatomic, strong) NSURL *downloadingFileURL;
  18. /**
  19. * A Boolean value that determines whether verfifying crc64.
  20. When set to YES, it will verify crc64 when transmission is completed normally.
  21. The default value of this property is NO.
  22. */
  23. @property (nonatomic, assign) BOOL crc64Verifiable;
  24. - (instancetype)initForOperationType:(OSSOperationType)operationType;
  25. - (void)consumeHttpResponse:(NSHTTPURLResponse *)response;
  26. - (OSSTask *)consumeHttpResponseBody:(NSData *)data;
  27. - (nullable id)constructResultObject;
  28. - (void)reset;
  29. @end
  30. NS_ASSUME_NONNULL_END