测试已测试 | ✗ |
语言语言 | Obj-CObjective C |
许可证 | MIT |
发布最近发布 | 2015年3月 |
由 Akshay Deo 维护。
依赖 | |
AFNetworking | >= 0 |
MBProgressHUD | >= 0 |
网络可达性 | >= 0 |
这是一个在 Objective C 中覆盖最棒的网络库 AFNetworking 的非常简单的包装器。我们在 RC 内大量使用它,并且它正在积极更新。除非您了解自己在做什么,否则我建议您在消除此警告之前不要使用它。
我们以一个非常简单的格式添加了最常用的 HttpMethods 和 MBProgressHUD,以减少冗余代码。您可以将其视为在您的应用程序中使用 AFNetworking 时必须编写的样板代码。
当前支持的方法
+ (void) executeDeleteWithUrl:(NSString *)url AndParameters:(NSDictionary *)parameters AndHeaders:(NSDictionary *)headers withSuccessHandler:(void (^)(AFHTTPRequestOperation *, id, bool))success withFailureHandler:(void (^)(AFHTTPRequestOperation *, NSError *))failure withLoadingViewOn:(UIView *)parentView;
+ (void)executePostWithUrl:(NSString *)url andParameters:(NSDictionary *)parameters andHeaders:(NSDictionary *)headers constructingBodyWithBlock:(void (^)(id <AFMultipartFormData> formData))block withSuccessHandler:(void (^)(AFHTTPRequestOperation *, id, bool))success withFailureHandler:(void (^)(AFHTTPRequestOperation *, NSError *))failure withLoadingViewOn:(UIView *)parentView;
+ (void)executePostWithUrl:(NSString *)url andParameters:(NSDictionary *)parameters andHeaders:(NSDictionary *)headers withSuccessHandler:(void (^)(AFHTTPRequestOperation *, id, bool))success withFailureHandler:(void (^)(AFHTTPRequestOperation *, NSError *))failure withLoadingViewOn:(UIView *)parentView;
+ (void)executePostWithUrl:(NSString *)url andParameters:(NSDictionary *)parameters andHeaders:(NSDictionary *)headers andAuthorizationHeaderUser:(NSString *)user andAuthrozationHeaderPassword:(NSString *)password withSuccessHandler:(void (^)(AFHTTPRequestOperation *, id, bool))success withFailureHandler:(void (^)(AFHTTPRequestOperation *, NSError *))failure withLoadingViewOn:(UIView *)parentView;
+ (void)executePutWithUrl:(NSString *)url andParameters:(NSDictionary *)parameters andHeaders:(NSDictionary *)headers withSuccessHandler:(void (^)(AFHTTPRequestOperation *, id, bool))success withFailureHandler:(void (^)(AFHTTPRequestOperation *, NSError *))failure withLoadingViewOn:(UIView *)parentView;
+ (void)executeGetWithUrl:(NSString *)url andParameters:(NSDictionary *)parameters andHeaders:(NSDictionary *)headers withSuccessHandler:(void (^)(AFHTTPRequestOperation *, id, bool))success withFailureHandler:(void (^)(AFHTTPRequestOperation *, NSError *))failure withLoadingViewOn:(UIView *)parentView;
+ (void)executePatchWithUrl:(NSString *)url andParameters:(NSDictionary *)parameters andHeaders:(NSDictionary *)headers withSuccessHandler:(void (^)(AFHTTPRequestOperation *, id, bool))success withFailureHandler:(void (^)(AFHTTPRequestOperation *, NSError *))failure withLoadingViewOn:(UIView *)parentView;
Akshay Deo,[email protected]
版权所有 (c) 2014 Akshay Deo [email protected]
版权所有 (c) 2014 RainingClouds Technologies Private Limited
特此授予任何获得本软件及其相关文档副本(以下简称“软件”)的人,无需支付任何费用,在该软件上不受限制地处理该软件,包括但不限于使用、复制、修改、合并、发布、分发、再许可和/或转售本软件副本,并准许向本软件提供副本的人按以下条件进行。
应在所有副本或主要部分中包含以上版权声明和许可声明。
软件按“原样”提供,不提供任何明示或暗示的保证,包括但不限于适销性、针对特定目的的适用性和非侵权性。在任何情况下,作者或版权持有者都不应对任何索赔、损害或其它责任负责,无论是基于合同、侵权或其他行为,这些索赔、损害或其它责任源于、涉及或与软件或软件的使用或其它方式有关。