Catching 302 FOUND in JavaScript

后端 未结 5 2105
予麋鹿
予麋鹿 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:06

    In my problem reason was:

    i was using localhost/Home/Test addres for testing the page. But ajax request code using 127.0.0.1/Home/AjaxRequest for url parameter. When the urls are different this error occurs.

    maybe it helps someone :)

提交回复
热议问题