悟空记账

JZHttp.h 742B

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