When vue sends post, json data format

defines a

card:{
    "workflow": {
        "test": "code",
        "name": "Jack"
    },
    "since": []
}

such a data format, when sending a post request, Request Payload is parsed into a string instead of json format. Is the definition of the data format wrong or have to be converted?

Jun.22,2021

you see whether the Content-Type in Network is application/json
in addition, the native js you use to do ajax or a framework like axios
specify that Content-type


browsers cannot pass arrays or objects. If you want to transfer it to a string again, it should be an omission to convert your data into a string. Try to convert the card object with JSON.stringify ().

Menu