POST/Redirect/GET (PRG) vs. meaningful 2xx response codes

后端 未结 2 1015
迷失自我
迷失自我 2021-02-07 20:56

Since the POST request in a POST/Redirect/GET (PRG) pattern returns a redirect (303 See Other) status code on success, is it at all possible to inform the client of

2条回答
  •  星月不相逢
    2021-02-07 21:41

    Send human-targetted information in the response body as HTML. Don't differentiate on the User-Agent header; if you also need to send bodies to machines, differentiate based upon the Accept request header.

提交回复
热议问题