get json data when we get error code in axios
snippet in javascript

get json data when we get error code in axios

user5070

axios.post('/formulas/create', {
	name: "",
	parts: ""
})
.then(response => { 
	console.log(response)
})
.catch(error => {
    console.log(error.response)
});

ruby on rails test if all parameters in json request are here

user4051

if(params.has_key?(:one) && params.has_key?(:two))

send data with url in php

user8136

// Send the variables myNumber=1 and myFruit="orange" to the new PHP page...
<a href="page2.php?myNumber=1&myFruit=orange">Next page</a>