Jquery ajax login authentication error

the following code is the post request of ajax. There is no problem with the request path. I don"t know what"s wrong. I always use the error method

.

userinformation.txt

error

405

Nov.19,2021

Type error
pass parameters
method is not allowed 405 is it get

The

information is too undetailed to reproduce, nor does it have any debugging information.

  1. post console
  2. post network

take a look at what the error error is:

    error: function(jqXHR, textStatus, errorMsg) {
        var response = JSON.parse(jqXHR.responseText);
        switch(jqXHR.status) {

            case(500):
                console.log(response.message);
                // ;
                break;
            case(401):
                console.log("");
                var refURL = window.location.href;
                break;
            case(403):
                console.log("");
                break;
            case(404):
                console.log("");
                break;
            case(504):
                console.log("");
                break;
            default:
                console.log("");
        }
    }

F12 open the developer tool and see what errors are reported in console.

reference: jquery ajax error function


.
if your backend does not do special parsing for .txt , this is a GET request.
verbs do not use whatever you want, but need the cooperation of the back end. Generally, this kind of file acquisition is a GET request. If you want to use POST, you have to make an appointment with the backend in advance ~

.

Previous: H5 page jumps to app so you can write it. I'm ios now, but I can't do Android.

Next: Js deals with data algorithm problems

Menu