84669 person learning
152542 person learning
20005 person learning
5487 person learning
7821 person learning
359900 person learning
3350 person learning
180660 person learning
48569 person learning
18603 person learning
40936 person learning
1549 person learning
1183 person learning
32909 person learning
A 400 error is reported in the background. The error method I wrote is to alert a prompt, but there is no prompt. . what's the situation
光阴似箭催人老,日月如移越少年。
angular $http usage (.success, .error what happens?)
$http({ method: 'POST', data: {test: 'test'} url: '/someUrl' }).then(function(response) { // this callback will be called asynchronously // when the response is available }, function(response) { // called asynchronously if an error occurs // or server returns response with an error status. });
Is it because the backend did not respond to the AJAX request result and the frontend did not receive the status value
It is estimated to be similar to the fetch API design. 400 is a normal code return. It can be executed to resolve
400 Bad RequestThe server cannot or will not handle the request due to obvious client error (e.g., malformed request syntax, too large size, invalid request message, or deceptively routed request).
The above is taken from Wikipedia
4** is about the front-end error. You should check whether the parameters and types sent match the definition of the back-end interface, and carefully look at the part that sends the request
angular $http usage (.success, .error what happens?)
Is it because the backend did not respond to the AJAX request result and the frontend did not receive the status value
It is estimated to be similar to the fetch API design. 400 is a normal code return. It can be executed to resolve
The above is taken from Wikipedia
4** is about the front-end error. You should check whether the parameters and types sent match the definition of the back-end interface, and carefully look at the part that sends the request