Client Proxy Settings in Postman
Millions of developers have already used Postman’s built-in proxy and Interceptor proxy to capture requests. Today, Postman is announcing client proxy settings in the Postman native apps to enhance your API development by directing API requests to a specified internet location.
First, a word about Postman’s Chrome app – it has a client proxy whose configuration is automatically handled by Chrome. The Postman Chrome app can be used in tandem with the Postman Interceptor extension to make and capture requests.
On the other hand, Postman’s native apps have always had a proxy server to capture requests from a separate client, but not a way to send requests through a configured proxy server.
Since Google announced their plans to end support for Chrome Apps for Windows, Mac, and Linux users, we started preparing to deprecate the Postman Chrome app. In addition to introducing native apps for Mac / Windows / Linux users last year, Postman’s native app users have access to more powerful features and will now be able to configure a client proxy.
A proxy server can be managed using external services, and client proxy configurations can be managed using the Operating System’s configuration, but now there’s a way to do both in the Postman native apps. Rolling these features into the Postman native apps makes them easier to use and has the added benefit of being fully integrated.
To recap:
- Postman’s Interceptor
- Postman’s built-in proxy
- Postman’s custom proxy settings – NEW!
- Postman’s system proxy settings – NEW!
What is a Proxy?
In basic web speak, a client makes a request to the server, and the server sends back a response.
A proxy server is an application or system that acts as an intermediary between your computer and the internet, or more specifically, the client and server. The proxy makes requests on your behalf to websites, servers, and other internet services.
The proxy can reside on your local machine, somewhere in your network, or at any point between your client and the destination server on the internet.
Similar to the way parents might speak to each other through a child, the child is a proxy relaying all communications between the 2 parents.
Parent 1: Ask your father if he can pick you up after school.
Timmy: Can you pick me up after school.
Parent 2: Yeah.
Timmy: Dad says yeah.
In this analogy, the child forwards the information on behalf of each parent. Besides just relaying information, proxies can do much more.
- Record all traffic between your machine and the internet
- Reveal the contents of all requests, responses, cookies, and headers
- Route traffic to specified internet locations
- Debugging
- Security from direct attacks
- DevOps load balancing
A proxy acts like a go-between to perform various functions. There are a bunch of different types of proxies, but today we’ll talk about how to use Postman as a web proxy. Postman has 4 different web proxies that function to either capture API requests or direct API requests.
The Postman Interceptor
Postman Interceptor is a Chrome extension that functions as a proxy to capture HTTP or HTTPS requests. In this example:
- The Chrome browser is the client that sends a request to the web server which is INTERCEPTED by the Postman Interceptor.
- The Interceptor is listening for any calls made by the Chrome browser and captures the request, forwards the request onward, and also sends the request to Postman.
- The web server returns a response directly to the Chrome browser.
Using the Interceptor, you can inspect HTTP and HTTPS communication going out from your Chrome browser. Furthermore, Interceptor can be used along with the Postman app (Chrome version) to log the network calls. Keep reading to see how.
The Postman proxy
Postman has a proxy in the Postman app that captures the HTTP request.
- The Postman app listens for any calls made by the client app or device.
- The Postman proxy captures the request and forwards the request onward to the server.
- The server returns a response through the Postman proxy back to the client.
Similar to the Interceptor Chrome extension, the Postman app proxy also INTERCEPTS and captures your requests. In this scenario, the Postman app is the proxy, and you can inspect HTTP communication going out from your phone for example, and log all network requests under the History tab of the sidebar.
Postman custom proxy settings
So far, the 2 examples we’ve seen show how the Postman proxy is used to capture API requests. Web proxies can also direct requests to a specified web location. Postman’s native apps for Mac / Windows / Linux users support configuring these such proxies. The next 2 examples will show how to do this.
Postman allows you to configure custom proxy settings that direct Postman to forward your HTTP or HTTPS requests through a proxy server. In other words, this will route all requests sent via the Postman app through a proxy server of your choosing.
- The Postman app is the client that sends a request through the selected proxy.
- The proxy server sends the request to the server.
- The server returns a response back through the proxy server.
Read more about configuring custom proxy settings.
Postman system proxy settings
If all of your applications need to use the same proxy, you might have a default proxy configured at the Operating System level. Use the system proxy settings to forward your HTTP or HTTPS requests in Postman through your OS’s default configuration. In other words, you are telling the Postman app and all requests sent using Postman to follow your OS’s default configuration.
- The Postman app is the client that sends a request through your Operating System’s default configuration, which forwards the request to the proxy server.
- The system proxy server sends the request to the server.
- The server returns a response back through the proxy server.
This is actually not a new feature, but now you can send your requests through a configured proxy server, either a custom one or the system’s default. Read more about configuring system proxy settings.
Dear Sir,
I am not understood about the Postman System Proxy.
Can you explain me about this.