The introduction of
I added a new route to my project to try to add some functionality. After the function code was added, I found that the page was loading all the time when I submitted the POST request. At this time, I went to the console and reported something wrong: BadRequestError: Request Aborted
This makes me very confused. Separate test function code and the existing project when it is working well, but can be combined together to die, what is the reason?
why
Encounter the problem first Baidu, but goose Baidu a day also did not Baidu to, basically still do not know what the problem is only an error information request aborted also do not know Baidu what…
Then you can only hard look at the error message in an attempt to discover the cause. First look at the error message: \node_modules\raw-body\index.js:231:10
annotation of these two lines of code is ok, but the problem comes, I can’t change the processing library, how much code should be changed.
Then I still can’t find the reason, and finally in the chat with the boss was the boss out of ! Sure enough, a proper route was run before the function code, and post requests were processed using express-formidable, a formidable component that clashed between the body-parser and express-formidable, causing Request Aborted
Read More:
- In the HTML page request Ajax times 400 error, solve Yii submit post form 400 error, and Ajax post request 400 problem (example code)
- Flask Request an extension before_request after_request errorhandler
- CSRF verification failed. Request aborted.
- Forbidden (403) CSRF verification failed. Request aborted. – Django
- Resourceaccessexception: I / O error on post request for and connection timed out
- Error domain = nsurlerrordomain code = – 1001 “request timeout occurred in swift alamofire get request. ” UserInfo={NSUnderlyingErro
- Jetty9 change post request length
- Flash + Vue uses Axios to obtain server data, and reports error: “request aborted”
- request:fail url not in domain list or Cannot send network request to localhost
- egg.js The frame post request reported an error of invalid CSRF token security verification, which has been solved
- IIS “Bad Request – Request Too Long. HTTP Error 400. The size of the request headers is too long.”
- Error 1: Vue quickly clicks the route to jump. Error: uncaught (in promise) error: request aborted
- When feign is called, the solution of request method ‘post’ not supported appears
- Nginx modifies the front end request size limit (413 request entity too large)
- Error: timeout of 5000ms exceeded error is always reported during post request
- Bad Request – Request Too Long. HTTP Error 400. The size of the request headers is too long
- Android API 27 and above use HTTP protocol request mode
- Springboot project: error parsing HTTP request header note: further occurrences of HTTP request parsing
- WebView loadrequest request request error “nsurlconnection finished with error – Code – 1022”
- Four ways to get Django parameters in request