0

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.

ßrilliant
  • 144
  • 1
  • 11

1 Answers1

1

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

awrfisher
  • 196
  • 5
  • thank you so much for your help. I haven't used postman to analize the request yet, but seems promising. – ßrilliant Apr 13 '20 at 22:26
  • 1
    Also, if you were wondering, I am busy making a reddit library to analyze the API and to make requests to it. When interacting with API it is important to get as much information as possible from the request you are sending. I am making a POST request to the login api for reddit, and am trying to recieve the modhash and the cookie. I hope this gave you some extra detail – ßrilliant Apr 13 '20 at 22:29