ILHTTPClientiOS 的 HTTP 开发包

联合创作 · 2023-09-27 09:45

ILHTTPClient 是一个非常简单的 AFNetworking 库的封装,还带有一个动画的 HUD 状态显示。



示例代码:



[client getPath:path
parameters:params
loadingText:@"Loading"
successText:@"Completed!"
success:^(AFHTTPRequestOperation *operation, NSString *response)
{
id JSON = [response JSONValue]; //If JSON is returned
/* Do something with this data */
}
failure:^(AFHTTPRequestOperation *operation, NSError *error)
{
NSLog(@"Error: %@", error);
/* Handle the error here */
}];
浏览 17
点赞
评论
收藏
分享

手机扫一扫分享

编辑 分享
举报
评论
图片
表情
推荐
点赞
评论
收藏
分享

手机扫一扫分享

编辑 分享
举报