HTTP状态代码0是什么意思 [英] What does HTTP status code 0 mean

查看:1483
本文介绍了HTTP状态代码0是什么意思的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在从事iOS项目。



在此应用程序中,我正在从服务器下载图像。



问题: / p>

在下载图片时,我正在获得请求超时。根据文档HTTP请求超时的状态代码是 408



但在我的应用程序中,我正在获取HTTP状态代码 0 带有以下错误



错误域= NSURLErrorDomain代码= -1001请求定时去。 UserInfo = 0xb9af710 {NSErrorFailingURLStringKey = http://xxxx.com/resources/p/PNG/1383906967_5621_63.jpg,NSErrorFailingURLKey = http://xxxx.com/resources/p/PNG/1383906967_5621_63.jpg,NSLocalizedDescription =请求超时。,NSUnderlyingError = 0x13846870请求超时。}



在网络搜索期间,我没有找到有关HTTP状态代码0的信息。 / p>

任何人都可以解释这一点吗?

解决方案

没有HTTP状态码0.你看到的是你正在使用的API /库返回的0。您必须检查该文件。


I am working on iOS project.

In this application I am downloading images from server.

Problem:

While downloading images I am getting Request Timeout. According to documentation HTTP status code of request timeout is 408.

But in my application I am getting HTTP status code 0 with following error

Error Domain=NSURLErrorDomain Code=-1001 "The request timed out." UserInfo=0xb9af710 {NSErrorFailingURLStringKey=http://xxxx.com/resources/p/PNG/1383906967_5621_63.jpg, NSErrorFailingURLKey=http://xxxx.com/resources/p/PNG/1383906967_5621_63.jpg, NSLocalizedDescription=The request timed out., NSUnderlyingError=0x13846870 "The request timed out."}

During search over internet I found no information about HTTP Status Code 0.

Can anyone explain this to me?

解决方案

There is no HTTP status code 0. What you see is a 0 returned by the API/library that you are using. You will have to check the documentation for that.

这篇关于HTTP状态代码0是什么意思的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆