Request ajax to report an error and return readyState0

you can make a normal request on postman, but if you change it to ajax, you will report an error. Execute error

directly.
var params = {
                userNameId: "cni23026672"
            }
$.ajax({
                type:"post",
                url:serviceUrl+getReleaseList+"?pageNum=" + pageNum + "&pageSize=10",
                async:true,
                contentType: "application/json; charset=utf-8",
                timeout: 10000,
                data: params,
                dataType: "json",
                success: function(data) {
                    console.log(JSON.stringify(data))
                },
                error: function(err) {
                    console.log(JSON.stringify(err))
                }
            });

return error message:

{"readyState":0,"status":0,"statusText":"timeout"}

which great god has ever met, please have a look. Thank you here!

Apr.22,2021

post request. Url cannot stitch parameters


not first I want to know what URL is?
? &? GET request.

?
ansyc false  

literally means timeout well
click network , find the request you sent, and find the request part of the screenshot. There is a code button in postman . Click on it and select http , and then you can compare the differences between the messages you send.


there is no problem just looking at the code

the problem may lie in whether the parameters of the API or the method of the http are consistent with those defined by the backend. It is recommended to interface with the backend joint debug

.
Menu