【问题标题】:Unexpected response code 303 Volley error意外响应代码 303 Volley 错误
【发布时间】:2019-08-01 00:04:45
【问题描述】:

我在我的项目中使用了这个 Volley 版本 implementation 'com.mcxiaoke.volley:library-aar:1.0.0',它工作正常,但今天我发现它没有得到服务器的响应,并显示以下错误代码:

E/Volley:[4722] BasicNetwork.performRequest:http://....other_link_part 的意外响应代码 303

当我点击链接时,我发现它工作正常,并且 json 在浏览器上成功显示给我。

【问题讨论】:

  • 请执行 'com.mcxiaoke.volley:library:1.0.19'。 Code 303 是一种将 Web 应用程序重定向到新 URI 的方法
  • 我做了那个实现,但问题仍然存在,我还在github.com/samkirton/android-volley 版本 1.0.19 中读到只处理 301 或 302 重定向,那么还有其他方法可以处理 303 重定向吗?

标签: java android http android-volley


【解决方案1】:

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

com.android.volley.NoConnectionError: javax.net.ssl.SSLHandshakeException: java.security.cert.CertPathValidatorException: 找不到证书路径的信任锚,因此它在与服务器的检查连接中显示为断开连接,并且链接架构更改为http 当我发现 https 证书错误并像这个链接一样解决时,它给了我 303 错误代码: Android volley error: "Trust anchor for certification path not found", only in real device, not emulator 一切正常。

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

希望能解决你的问题

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-08-06
    • 2023-04-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多