酷店

KDPNetworkRequestHTTP.h 700B

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