The data submitted in post mode in vue cannot be received by the backend.

submit data with this.$http.post, and the value received in the backend controller is always empty. Here is the code

clipboard.png
using JSON.stringify () serialization has no effect either

Mar.01,2021

use browser F12 to see if the request is sent correctly, and it may also be a backend problem


  1. confirm your ajax request library first, using axios or something else?
  2. F12 check your / sort/addSort request information. What is content-type and what is the request body?
  3. confirm whether the front and back end asynchronous request content-type is consistent, using form data or request payload ?

you have provided so little information that no one can accurately point out the problem. The above three steps should be enough for you to find out what the problem is


I have encountered that if the data of post is an array, it cannot be submitted to the background by using JSON.stringify (). Later, a judgment is added to determine that the data of
post will not be submitted directly by calling JSON.stringify () if it is an array.

Menu