有时候可能请求某个服务器接口很慢会导致请求超时,所以需改变默认的请求超时时间。
AFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager manager];
/
//设置请求超时时间:默认为60秒。
manager.requestSerializer.timeoutInterval = 180;
有时候可能请求某个服务器接口很慢会导致请求超时,所以需改变默认的请求超时时间。
AFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager manager];
/
//设置请求超时时间:默认为60秒。
manager.requestSerializer.timeoutInterval = 180;
本文标题:AFNetworking设置请求网络超时
本文链接:https://www.haomeiwen.com/subject/tchllttx.html
网友评论