'Correct usage of data/body with axios in node.js
I get the error 'NOT_FOUND' with the error code of 404 when trying this code:
axios.get(`https://api.exchange.bitpanda.com/public/v1/account/deposit/crypto`, {
headers: {
'content-type': 'application/json',
'Authorization': 'Bearer api_key'
},
data: {
"currency": "BTC"
}
})
.then(function (response) {
console.log(response.data)
})
.catch(function (error) {
console.log(error.response.data);
console.log(error.response.status);
})
For some reason there are no examples in node.js
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
