Quantcast
Channel: Active questions tagged config - Stack Overflow
Viewing all articles
Browse latest Browse all 5054

axios transformResponse returning undefined

$
0
0

With the following I get the expected response.data value:

axios({  method,  url}).then(response => { console.log(response) })

However, when I add the transformResponse property as follows I get a response.data value of undefined:

axios({  method,  url,  transformResponse: [(data) => {    return data  }]}).then(response => { console.log(response) })

Can someone please tell me what I'm missing here! Thanks


Viewing all articles
Browse latest Browse all 5054

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>