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

后端 未结 2 1011
迷失自我
迷失自我 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:40

    If you have control over the web server, how about differentiating between the Agent header ? Fill it in something only you know of (a GUID or other pseudo-random thing) and present that one to the webserver from the automated client. Then have the webserver response with 201 / 303 accordingly.

提交回复
热议问题