No Description

KXHTTP.h 765B

123456789101112131415161718192021222324252627
  1. //
  2. // KXHTTP.h
  3. // QBCS
  4. //
  5. // Created by kuxuan on 2017/6/8.
  6. // Copyright © 2017年 kuxuan. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. @interface KXHTTP : NSObject
  10. /**
  11. *普通get请求
  12. */
  13. + (void)get:(NSString *)url params:(NSDictionary *)params success:(void(^)(id json))success failure:(void(^)(NSError *error))failure;
  14. /**
  15. *普通post请求
  16. */
  17. + (void)post:(NSString *)url params:(NSDictionary *)params success:(void(^)(id json))success failure:(void(^)(NSError *error))failure;
  18. /*
  19. * 上传图片
  20. */
  21. + (void)uploadImageWithUrl:(NSString *)url name:(NSString *)name params:(NSDictionary *)params imageData:(NSData *)data imageName:(NSString *)imageName success:(void(^)(id json))success failure:(void(^)(NSError *error))failure;
  22. @end