aliyun-oss-react-native

OSSURLRequestRetryHandler.h 892B

12345678910111213141516171819202122232425262728293031323334353637
  1. //
  2. // OSSURLRequestRetryHandler.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. @class OSSNetworkingRequestDelegate;
  11. NS_ASSUME_NONNULL_BEGIN
  12. /**
  13. The retry handler interface
  14. */
  15. @interface OSSURLRequestRetryHandler : NSObject
  16. @property (nonatomic, assign) uint32_t maxRetryCount;
  17. + (instancetype)defaultRetryHandler;
  18. - (OSSNetworkingRetryType)shouldRetry:(uint32_t)currentRetryCount
  19. requestDelegate:(OSSNetworkingRequestDelegate *)delegate
  20. response:(NSHTTPURLResponse *)response
  21. error:(NSError *)error;
  22. - (NSTimeInterval)timeIntervalForRetry:(uint32_t)currentRetryCount
  23. retryType:(OSSNetworkingRetryType)retryType;
  24. @end
  25. NS_ASSUME_NONNULL_END