【文件属性】:
文件名称:对ASI post方式的封装
文件大小:2KB
文件格式:ZIP
更新时间:2017-06-26 05:07:32
asi post 封装 httprequest
对ASIHTTPRequest的post请求封装,使它使用起来更加的方便
使用方法:
MyURLClass *post = [MyURLClass urlGo];
post.DataBlock = ^(NSData *data){
NSError *error;
if (data == Nil) {
UIAlertView *alt = [[UIAlertView alloc]initWithTitle:@"提示" message:@"网络连接出错,请确认网络状况" delegate:nil cancelButtonTitle:@"确定" otherButtonTitles:nil];
[alt show];
return;
}
NSDictionary *dictionary = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableLeaves error:&error];
NSLog(@"%@",dictionary);
};
[post post:dic Url:@"xxxxxxx"];
【文件预览】:
ASI封装post
----MyURLClass.m(1KB)
----MyURLClass.h(350B)