I only want to receive a JSON response via GET. Unfortunately I just get an "undefined" when I execute the code. The URL is correct. If I call the URL directly with the web browser I get a JSON back.
What I do wrong?
Here my Code:
try { | |
axios.get("here-my-url") | |
.then(data => res.status(200).send(data)) | |
.catch(err => res.send(err)); | |
} catch(err) { | |
console.error("ERROR", err); | |
} |
Top comments (0)