gpt4 book ai didi

ios - NSURLConnection 的错误代码 "-1009"是什么意思?

转载 作者:IT王子 更新时间:2023-10-29 07:48:11 24 4
gpt4 key购买 nike

当我发送请求并收到错误代码 -1009 的错误时,这是​​什么意思?我不确定如何处理它。

- (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error{
NSLog(@"connection didFailWithError");

if(error.code==-1009){
//do something
}
}

最佳答案

由于返回的错误应该在 NSURLErrorDomain 中,code -1009意思是:

NSURLErrorNotConnectedToInternet

Returned when a network resource was requested, but an internet connection is not established and cannot be established automatically, either through a lack of connectivity, or by the user's choice not to make a network connection automatically.

关于ios - NSURLConnection 的错误代码 "-1009"是什么意思?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6689407/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com