OSSHttpResponseParser.h 912 B

12345678910111213141516171819202122232425262728293031323334353637
  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. /**
  18. * A Boolean value that determines whether verfifying crc64.
  19. When set to YES, it will verify crc64 when transmission is completed normally.
  20. The default value of this property is NO.
  21. */
  22. @property (nonatomic, assign) BOOL crc64Verifiable;
  23. - (instancetype)initForOperationType:(OSSOperationType)operationType;
  24. - (void)consumeHttpResponse:(NSHTTPURLResponse *)response;
  25. - (OSSTask *)consumeHttpResponseBody:(NSData *)data;
  26. - (nullable id)constructResultObject;
  27. - (void)reset;
  28. @end
  29. NS_ASSUME_NONNULL_END