dkahgld

ZBHTTP.h 661B

123456789101112131415161718192021222324252627282930313233
  1. //
  2. // ZBHTTP.h
  3. // ZBProject
  4. //
  5. // Created by 学丽 on 2019/3/26.
  6. // Copyright © 2019 ZB. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. NS_ASSUME_NONNULL_BEGIN
  10. @interface ZBHTTP : NSObject
  11. /**
  12. post请求
  13. @param url 请求地址
  14. @param params 参数
  15. @param success 成功回调
  16. @param failure 失败回调
  17. */
  18. + (void)post:(NSString *)url params:(NSDictionary *)params success:(void(^)(id json))success failure:(void(^)(NSError *error))failure;
  19. /**
  20. *普通get请求
  21. */
  22. + (void)get:(NSString *)url params:(NSDictionary *)params success:(void(^)(id json))success failure:(void(^)(NSError *error))failure;
  23. @end
  24. NS_ASSUME_NONNULL_END