#import "QNHttpResponseInfo.h"
#import "QNUploadInfoReporter.h"
#import "QNReportConfig.h"
接口变更:
QNPrequeryReturn:【内部使用】
// 7.4.1:
typedef void (^QNPrequeryReturn)(int code, QNHttpResponseInfo * _Nullable httpResponseInfo);
// 8.0.0:
typedef void (^QNPrequeryReturn)(int code, QNResponseInfo * _Nullable httpResponseInfo, QNUploadRegionRequestMetrics * _Nullable metrics);
- (NSString *)upHost:(QNZoneInfo *)zoneInfo
isHttps:(BOOL)isHttps
lastUpHost:(NSString *)lastUpHost; 【内部使用】
- (NSString *)up:(QNUpToken * _Nullable)token
zoneInfoType:(QNZoneInfoType)zoneInfoType
isHttps:(BOOL)isHttps
frozenDomain:(NSString * _Nullable)frozenDomain; 【内部使用】
接口变更:
// 7.4.1:
+ (NSArray <QNFixedZone *> *)localsZoneInfo;
// 8.0.0:
+ (QNFixedZone *)localsZoneInfo;
接口变更:无
接口变更:无
接口变更:
// error 类型:
extern const int kQNLocalIOError;
extern const int kQNMaliciousResponseError;
// property:
@property (nonatomic, copy, readonly) NSDictionary *responseDictionary;
@property (nonatomic, copy, readonly) NSString *message;
@property (nonatomic, readonly) BOOL isTlsError;
@property (nonatomic, readonly) BOOL couldRetry; 【内部使用】
@property (nonatomic, readonly) BOOL couldHostRetry;【内部使用】
@property (nonatomic, readonly) BOOL couldRegionRetry; 【内部使用】
以下调整均为【内部使用】,外部不推荐使用,详情见代码注释
// 7.4.1:
+ (instancetype)cancelWithDuration:(double)duration;
+ (instancetype)responseInfoWithInvalidArgument:(NSString *)desc duration:(double)duration;
+ (instancetype)responseInfoWithInvalidToken:(NSString *)desc duration:(double)duration;
+ (instancetype)responseInfoWithFileError:(NSError *)error duration:(double)duration;
+ (instancetype)responseInfoOfZeroData:(NSString *)path duration:(double)duration;
+ (instancetype)responseInfoWithHttpResponseInfo:(QNHttpResponseInfo *)httpResponseInfo duration:(double)duration;
// 8.0.0:
+ (instancetype)cancelResponse;
+ (instancetype)responseInfoWithNetworkError:(NSString *)desc;
+ (instancetype)responseInfoWithInvalidArgument:(NSString *)desc;
+ (instancetype)responseInfoWithInvalidToken:(NSString *)desc;
+ (instancetype)responseInfoWithFileError:(NSError *)error;
+ (instancetype)responseInfoOfZeroData:(NSString *)path;
+ (instancetype)responseInfoWithLocalIOError:(NSString *)desc;
// 8.0.0
+ (instancetype)errorResponseInfo:(int)errorType
errorDesc:(NSString *)errorDesc;
- (instancetype)initWithResponseInfoHost:(NSString *)host
response:(NSHTTPURLResponse *)response
body:(NSData *)body
error:(NSError *)error;
接口变更:无
接口变更:无
接口变更:无
接口变更:无
接口变更:无