Catching 302 FOUND in JavaScript

后端 未结 5 2107
予麋鹿
予麋鹿 2020-11-27 03:32

I use jQuery to make an AJAX POST request to my server, which can return HTTP response with status 302. Then JavaScript just sends GET request to this URL, while I\'d like t

5条回答
  •  南方客
    南方客 (楼主)
    2020-11-27 04:11

    Rather than asking the Javascript code to Handle 302, it would be better to return a 500 with custom error code+ message on event of 302

提交回复
热议问题