JDragonSoap 0.0.9

JDragonSoap 0.0.9

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Jan 2017

Maintained by JDragon.



 
Depends on:
AFNetworking~> 3.1.0
Reachability~> 3.2
 

一个基于AFNetworking的网络请求

更新日志:基于AFNetworking 3.1 支持非校验Https请求

NSURLConnection 替换为NSURLSession

setup

user pod


pod 'JDragonSoap','~> 0.0.9'


如何使用

[JDragonSoap shareInstance].urlHost =@"";
[JDragonSoap shareInstance].parameter = @{};



/**
*  检测网络状态
*/
[JDragonSoap netWorkStateReachability:^(int netConnetState) {

NSLog(@"网络状态==%d",netConnetState);
}];


/**
*  Get 请求
*
*  @param returnValue block
*
*  @return 数据请求结果
*/
[JDragonSoap soapGetRequestWith:^(id returnValue) {

NSLog(@"Get=======%@",returnValue);

}];

[JDragonSoap soapGetRequestWith:^(id returnValue) {

[SVProgressHUD dismiss];
NSLog(@"get=======%@",returnValue);

} errorBlock:^(id errorCode) {

NSLog(@"error=======%@",errorCode);

}];




[JDragonSoap shareInstance].urlHost =@"";
[JDragonSoap shareInstance].parameter = @{};

/**
*  Post 请求
*
*  @param returnValue block
*
*  @return 数据请求结果
*/
[JDragonSoap soapPostRequestWith:^(id resultValue) {

NSLog(@"Post=======%@",resultValue);

}];

[JDragonSoap soapPostRequestWith:^(id resultValue) {

[SVProgressHUD  dismiss];
NSLog(@"post=======%@",resultValue);

} errorBlock:^(id errorCode) {

NSLog(@"error=======%@",errorCode);

}];


other

详细请看demo