开发者社区> 问答> 正文

post请求返回302是什么问题

游客irm3nny572smk 2019-03-28 11:04:56 433

302 Found


The requested resource resides temporarily under a different URI.



Powered by Tengine
tengine API 语音技术
分享到
取消 提交回答
全部回答(1)
  • 易立
    2019-07-17 23:32:04

    一般而言 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.

    0 0

集结各类场景实战经验,助你开发运维畅行无忧

推荐文章
相似问题
推荐课程