QNSessionManager.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #import "QNHttpDelegate.h"
  2. #import <Foundation/Foundation.h>
  3. #import "QNConfiguration.h"
  4. #if (defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 70000) || (defined(__MAC_OS_X_VERSION_MAX_ALLOWED) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 1090)
  5. @interface QNSessionManager : NSObject <QNHttpDelegate>
  6. - (instancetype)initWithProxy:(NSDictionary *)proxyDict
  7. timeout:(UInt32)timeout
  8. urlConverter:(QNUrlConvert)converter;
  9. - (void)multipartPost:(NSString *)url
  10. withData:(NSData *)data
  11. withParams:(NSDictionary *)params
  12. withFileName:(NSString *)key
  13. withMimeType:(NSString *)mime
  14. withCompleteBlock:(QNCompleteBlock)completeBlock
  15. withProgressBlock:(QNInternalProgressBlock)progressBlock
  16. withCancelBlock:(QNCancelBlock)cancelBlock
  17. withAccess:(NSString *)access;
  18. - (void)post:(NSString *)url
  19. withData:(NSData *)data
  20. withParams:(NSDictionary *)params
  21. withHeaders:(NSDictionary *)headers
  22. withCompleteBlock:(QNCompleteBlock)completeBlock
  23. withProgressBlock:(QNInternalProgressBlock)progressBlock
  24. withCancelBlock:(QNCancelBlock)cancelBlock
  25. withAccess:(NSString *)access;
  26. - (void)get:(NSString *)url
  27. withHeaders:(NSDictionary *)headers
  28. withCompleteBlock:(QNCompleteBlock)completeBlock;
  29. @end
  30. #endif