ßrilliant
ßrilliant

Reputation: 144

Retrieve Response query using node-fetch

One day I was busy using node-fetch to make an HTTP Request, and tried to retrieve the Response Text. When using Chrome Dev Tools, you can get this information in the Response tab. Like This: enter image description here

The method of request does not matter.

I am trying to access the response text shown in the Response tab, using node-fetch. Any idea how or if it is possible to achieve this? If not, could you provide me with a module that could do this? The provided module must be able to do most types of HTTP requests, as well as being lightweight.

Thanks in advance.

Upvotes: 0

Views: 171

Answers (1)

awrfisher
awrfisher

Reputation: 196

I've found this piece of software very useful. I use dev tools a lot, and it definitely has its place, but for diagnosing responses, particularly big responses, I use postman.

https://www.postman.com/

I use it for gets, puts, posts etc, it will even give you code samples of your request in quite a few different languages.

It requires a gmail account. It is somewhat lightweight, i run it server side as well as clientside. It has been a lifesaver for diagnosing request headers/ responses.

Here is an example pic.

enter image description here

Upvotes: 1

Related Questions