首页 > 解决方案 > Unexpected response code 303 Volley error

问题描述

I'm using this Volley version implementation 'com.mcxiaoke.volley:library-aar:1.0.0' in my project and it works fine, but today I found it didn't got the response from the server with this error code:

E/Volley: [4722] BasicNetwork.performRequest: Unexpected response code 303 for http://....other_link_part

When I click on the link, I find it working fine and the json appears successfully to me on the browser.

标签: javaandroidhttpandroid-volley

解决方案


当我的链接是 https 时手动处理从 https 切换到 http 时,我遇到了类似的问题,证书有问题

com.android.volley.NoConnectionError: javax.net.ssl.SSLHandshakeException: java.security.cert.CertPathValidatorException: 未找到证书路径的信任锚,因此它在与服务器的检查连接中似乎断开连接,并且链接架构更改为 http,这给出了当我发现 https 证书错误并像此链接一样解决时出现 303 错误代码: Android volley 错误:“未找到证书路径的信任锚”,仅在真实设备中,而不是模拟器中 一切正常。

所以我的建议 - 如果它(http或https),请确保您连接到服务器的正确链接模式 - 检查凌空错误消息 - 如果证书有问题,请先尝试解决它

希望能解决你的问题


推荐阅读