Inspecting Postman Requests
There are a number of options that Postman provides to create your HTTP requests. Even so, there may be situations where you want to inspect the exact request and response payloads, to make sure that Postman isn’t causing your API call to fail.
Viewing the exact HTTP request and response is not straightforward. You’ll first need to enable the Chrome DevTools for Postman. DevTools are a set of extensive debugging tools built into Chrome. Check our blog post for instructions on how to do this.
Once you have DevTools enabled and opened, you’re good to go. There are 3 ways you can make requests in Postman:
- Using the request builder
- Using the collection runner
- Using Postman with the Interceptor enabled
Using the request builder
If you are making requests from the main Postman window with the Interceptor disabled, read on. You can right click on the main Postman window > Inspect element. In the Network tab, you’ll be able to see the request when you click the Send button. Clicking on the request in the Network tab will show you the response payload.
Using the collection runner
If you are using the collection runner to run entire collections, you’ll need to open DevTools for the Collection Runner, not the main window. You can right click on the Collection Runner window > Inspect element. In the Network tab, you’ll be able to see each request made when you start the collection run. Clicking on the request in the Network tab will show you the response payload.
Sending requests with the Interceptor enabled
Postman, being a Chrome application, has certain restrictions. For example, you cannot set Cookies while making a request. There’s a companion extension called the Postman Interceptor that acts as a middleman and lets you add cookies from within Postman! When the Interceptor is enabled, the actual HTTP request is made from the Interceptor, and not from Postman.
You can head to chrome://extensions, enable ‘Developer Mode’, and search for the Interceptor. Click the “Inspect views: background.html” link to open DevTools. You should see the requests and responses in the Interceptor’s DevTools window when you make requests through Postman.