Hi all!
This is my situation, I’ve been stuck on this for weeks, would be really grateful for some help.
I have a Nuxt.js site deployed on netlify. I use netlify functions to get data from an external API (using axios), and then the data is displayed back in the UI.
The function call works perfectly in POSTMAN, and when I use ‘netlify dev’ on localhost:8888.
Basically, instead of using the async keyword, the return statement does the trick. Could you try this and let us know if it works?
Do note that, we do not actually provide help with custom code as that’s beyond the scope of support, but this was a small change and could possibly work.
Hey @hrishikesh & @freddy thanks for taking the time to respond. I have changed the formatting of the axios statement as you (both) suggested, but this didn’t fix the problem, unfortunately.
I don’t think it’s a problem with the axios function, like I mention, it’s works fine locally. Therefore, I think it’s something to do with understanding the flow of data from external api’s, through a netlify function to the UI.