洛阳学员端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
912 B

8 months ago
  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