Home > front end >  Use the vue - recourse post request local json files an error 404 no found
Use the vue - recourse post request local json files an error 404 no found

Time:10-01

Can use a get request to the data, but cannot request using post, please god save:


The code is as follows:
The add () {
Enclosing $HTTP post ('./static/new_file - json. Json ', {name: this name}, {emulateJSON: true}), then (result=& gt; {
If (result. The status===0) {
Enclosing getAllList ()
} else {
Alert (' add failure)
}
})
}

Error:

CodePudding user response:

Json file is a static file does not support the post request
  • Related