Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

vue axios post return json data

// response is full Response object, with URL, headers, method and etc.
axios.post("http://localhost:8080/api/some/awesome/endpoint", postData)
	.then(response => console.log(response.data));
// no need for .json method, becouse response.data already is JS object
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #vue #axios #post #return #json #data
ADD COMMENT
Topic
Name
4+5 =