HTTP 400 error – invalid request (Bad request) is sometimes reported when ajax requests background data. The invalid request indicates that the request did not enter the background service;
Reasons: 1) The field name or field type of the data submitted by the front end is inconsistent with the entity class in the background, resulting in the failure of encapsulation;
2) The data submitted from the front end to the background should be of the JSON string type, while the front end did not convert the object to the string type;
Solutions:
1) Ensure consistency by comparing field names and types
2) Use Stringify to convert the object passed in front into string data: jSON.Stringify (param);
Reasons: 1) The field name or field type of the data submitted by the front end is inconsistent with the entity class in the background, resulting in the failure of encapsulation;
2) The data submitted from the front end to the background should be of the JSON string type, while the front end did not convert the object to the string type;
Solutions:
1) Ensure consistency by comparing field names and types
2) Use Stringify to convert the object passed in front into string data: jSON.Stringify (param);
https://www.cnblogs.com/beppezhang/p/5824986.html
Read More:
- IIS “Bad Request – Request Too Long. HTTP Error 400. The size of the request headers is too long.”
- urlopen error unknown url type:httpë/HTTP Error 400:Bad Request
- Bad Request – Request Too Long. HTTP Error 400. The size of the request headers is too long
- Spring MVC error HTTP status 400 – bad request
- Springboot project: error parsing HTTP request header note: further occurrences of HTTP request parsing
- ajax error 400 (Failed to load resource: the server responded with a status of 400 (Bad Request))
- Docker Nacos deployment uses container name to access 400 bad request
- Solution of Vue axios400 bad request problem
- Error parsing HTTP request header Note: further occurrences of HTTP header p
- The installation of Homebrew encountered a 400 Bad Request error
- jsp: Failed to load resource: the server responded with a status of 400 (Bad Request)
- Router DIO network request: dioerror[ DioErrorType.RESPONSE ]: HTTP status error [400] or [500]
- Tomcat error parsing HTTP request header
- The request failed with HTTP status 401: Unauthorized. SSRS 2008
- Resolve git clone error fatal: http request failed
- Git error: http request failed
- The solution that ioni cannot use HTTP request after packaging apk
- Android API 27 and above use HTTP protocol request mode
- Tomcat error: error parsing HTTP request header
- docker: Error response from daemon: Get https://registry-1.docker.io/v2/: net/http: request canceled