I think you should read the DOC first:
From : https://www.npmjs.com/package/axios
Your given URL looks like get method:
http/localhost:8080/sample-market/marketAPI/1234/product/publish?productOne=testing&productTwo=checking
But if you still want to use POST, then here you go :
axios.post('http/localhost:8080/sample-market/marketAPI/1234/product/publish', { productOne: 'testing', productTwo: 'checking' }) .then(function (response) { console.log(response); }) .catch(function (error) { console.log(error); });
For GET method :
axios.get('http/localhost:8080/sample-market/marketAPI/1234/product/publish', { params: { productOne: 'testing', productTwo: 'checking' } }) //OR direct axios.get('http/localhost:8080/sample-market/marketAPI/1234/product/publish?productOne=testing&productTwo=checking')