QNRequestClient.h 841 B

123456789101112131415161718192021222324252627282930
  1. //
  2. // QNRequestClient.h
  3. // QiniuSDK
  4. //
  5. // Created by yangsen on 2020/4/29.
  6. // Copyright © 2020 Qiniu. All rights reserved.
  7. //
  8. #import "QNUploadRequestMetrics.h"
  9. NS_ASSUME_NONNULL_BEGIN
  10. typedef void (^QNRequestClientCompleteHandler)(NSURLResponse * _Nullable, QNUploadSingleRequestMetrics * _Nullable, NSData * _Nullable, NSError * _Nullable);
  11. @protocol QNRequestClient <NSObject>
  12. // client 标识
  13. @property(nonatomic, copy, readonly)NSString *clientId;
  14. - (void)request:(NSURLRequest *)request
  15. server:(_Nullable id <QNUploadServer>)server
  16. connectionProxy:(NSDictionary * _Nullable)connectionProxy
  17. progress:(void(^ _Nullable)(long long totalBytesWritten, long long totalBytesExpectedToWrite))progress
  18. complete:(_Nullable QNRequestClientCompleteHandler)complete;
  19. - (void)cancel;
  20. @end
  21. NS_ASSUME_NONNULL_END