Hello there! Some background: I am a front end dev wanting to make an API call to display data on an app I’m building. I know next to nothing about the backend. I have completed the challenges in the Backend APIs and Microservices section but that’s it.
I finally figured out how to get an API call working, and to get around the CORS problem during development, I have set up a proxy server on Heroku by cloning cors-anywhere.
Well now I don’t have the CORS error anymore but I am getting an empty response. This is what the response looks like as logged in the console:
Response { type: "cors", url: "https://myproxyserver.herokuapp.com/https://www.xeno-canto.org/api/2/recordings?query=hawaiian+duck", redirected: false, status: 200, ok: true, statusText: "OK", headers: Headers, body: ReadableStream, bodyUsed: false }
The particular API I am testing this with doesn’t require a key, so that’s not the issue. I also tried to make this in Postman and it works there. Any guidance? How do I get the JSON data I need?
Thank you!