forked from SuperDannyBoy/AFHTTP
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Danny
committed
Apr 28, 2015
1 parent
033b2c1
commit d6b12d0
Showing
1 changed file
with
61 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,63 @@ | ||
# AFHTTP | ||
封装了AFNetworking的网络请求 | ||
AFHTTP | ||
=================== | ||
|
||
|
||
感谢开源精神,感谢我姐OMI,感谢我的队友。不足之处望大家见谅,当然,你可以Fork一个分支来完善我的工程,我将无比的荣欣。 | ||
|
||
---------- | ||
|
||
|
||
方法说明 | ||
------------- | ||
#### 发送一个请求 | ||
|
||
```objective-c | ||
- (void)sendRequest:(NSString *)url | ||
parameters:(NSDictionary *)parameters | ||
fileDictionary:(NSDictionary *)dataDic | ||
userInfo:(NSDictionary *)userInfo | ||
withType:(NSUInteger)requestType | ||
isShowHUD:(BOOL)isShow | ||
SuccessBlock:(RequestSuccess)success | ||
FailureBlock:(RequestFailure)failure | ||
``` | ||
|
||
> **参数说明:** | ||
> - **@param url** | ||
> baseURL | ||
> - **@param parameters** | ||
> 字典形式参数 | ||
> - **@param dataDic** | ||
> 默认传nil; 如果是上传文件,则传包括二进制数据在内的字典eg.@{@"data":@"xxxxxxx", @"key":@"file", @"type":@"png"} | ||
> - **@param userInfo** | ||
> 要取消的请求信息 eg.@{@"AFNetWorking_UserInfoKey":@"requestUrl"} | ||
> - **@param requestType** | ||
> 请求类型 | ||
> - **@param isShow** | ||
> 是否显示网络提示框 | ||
> - **@param success** | ||
> 成功Block | ||
> - **@param failure** | ||
> 失败Block | ||
|
||
#### 取消特定请求 | ||
|
||
```objective-c | ||
- (void)cancelRequestWithUserInfo:(NSDictionary *)dic | ||
``` | ||
|
||
> **参数说明:** | ||
> - **@param dic** | ||
> 要取消的请求信息 eg.@{@"AFNetWorking_UserInfoKey":@"xxxxx"} | ||
|
||
#### 取消所有请求 | ||
|
||
```objective-c | ||
- (void)cancelAllRequest | ||
``` |