Skip to content
Advertisement

Node express API not get in response?

I have created a node-express API.

JavaScript

And I request using fetch like this

JavaScript

In Network tab I got the same JSON object send from server. In console log of resonpse it print below things….

enter image description here

How can I use the JSON data that send from the server?

Advertisement

Answer

To get the actual data, you need response.json() like this to actually read and parse the body of the response:

JavaScript
User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement