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