开发者社区> 问答> 正文

post请求返回302是什么问题


302 Found


The requested resource resides temporarily under a different URI.



Powered by Tengine

展开
收起
游客irm3nny572smk 2019-03-28 11:04:56 11825 0
1 条回答
写回答
取消 提交回答
  • 易立,阿里云资深专家,目前负责阿里云容器服务和区块链服务研发。之前曾在IBM中国开发中心工作,担任资深技术专员。关注Docker/Kubernetes等云原生计算和Hyperledger Fabric/Ethereum等区块链技术。

    一般而言 302 是临时重定向的意思,需要客户端响应发送 GET 请求到 Location header,

    但是,不建议对POST请求发送 302作为响应,也不建议客户端对这个响应进行处理。这个不符合HTTP规范

    Note: RFC 1945 and RFC 2068 specify that the client is not allowed to change the method on the redirected request. However, most existing user agent implementations treat 302 as if it were a 303 response, performing a GET on the Location field-value regardless of the original request method. The status codes 303 and 307 have been added for servers that wish to make unambiguously clear which kind of reaction is expected of the client.

    2019-07-17 23:32:04
    赞同 展开评论 打赏
问答分类:
问答地址:
问答排行榜
最热
最新

相关电子书

更多
低代码开发师(初级)实战教程 立即下载
冬季实战营第三期:MySQL数据库进阶实战 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载