java - 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.
解决方案
当我的链接是 https 时手动处理从 https 切换到 http 时,我遇到了类似的问题,证书有问题
com.android.volley.NoConnectionError: javax.net.ssl.SSLHandshakeException: java.security.cert.CertPathValidatorException: 未找到证书路径的信任锚,因此它在与服务器的检查连接中似乎断开连接,并且链接架构更改为 http,这给出了当我发现 https 证书错误并像此链接一样解决时出现 303 错误代码: Android volley 错误:“未找到证书路径的信任锚”,仅在真实设备中,而不是模拟器中 一切正常。
所以我的建议 - 如果它(http或https),请确保您连接到服务器的正确链接模式 - 检查凌空错误消息 - 如果证书有问题,请先尝试解决它
希望能解决你的问题
推荐阅读
- android - 过渡动画比例不会禁用应用程序内的动画
- asp.net - Serilog 缺少我的 ASP VB.NET Web 项目的日志文件条目
- java - 从 S3 中的 EMR 集群读取问题
- java - 为什么 Log4j2 不在 Spring Boot 应用程序中登录?
- r - if/then 更改多个文本值时
- node-oracledb - 错误:NJS-045:无法为 Node.js 10.17.0(linux、x64)加载 oracledb 附加二进制文件
- powershell - 如何使用 split 和 substring 和 foreach 来处理数组
- python - 更改地理坐标python的顺序
- jdbc - kafka 没有从 clickhouse 检索数据
- google-apps-script - 使用谷歌应用程序脚本图表服务创建图表会产生低质量的图像