Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can you set the HTTP protocol version in Postman?

I need to specify HTTP 1.0 in a POST request via Postman. It defaults to HTTP 1.1. Does anyone know how to specify the version of the HTTP protocol, or am I out of luck?

like image 455
catalpa Avatar asked Dec 03 '13 18:12

catalpa


People also ask

How do I set the HTTP version in Postman?

You can try to copy the curl code by clicking on the Code link, and run it, specifying the http version by passing --http parameter to curl.

How do I change the HTTP protocol version?

You can't choose any protocol other than http/1.1 at this time. One option for getting requests into http/1.0 is to run a local proxy and point it to your target server. Some options: Using proxy_http_version , you can configure NGINX to forward traffic as http/1.0.

How do I send a http2 request Postman?

Currently, Postman doesn't support HTTP/2. Show activity on this post. I created a GUI tool that you can use to send HTTP requests, with support for HTTP/2 and HTTP/3. It has full compatibility with existing Postman collections and environments.

What are the HTTP methods in Postman?

In HTTP request method includes Request Method, Request URL, Request Headers, Request Body, Pre-request Script, and Tests.


1 Answers

Unfortunately, it's still not supported by Postman as of April 2019. Previous version of Postman used to be a browser extension and it wasn't possible to fine tune the request. Newer versions, however, run as standalone applications which could allow more low-level control of the request.

See the following comment quoted from the issue #6242 which was opened early April 2019 requesting an option to specify HTTP protocol version:

You'll be pleased to know that work is in progress for more low-level control over the request. Stay tuned.

As of January 2022, however, Postman haven't shared any updates on this.


Depending on what you need, you could use curl. It provides a set of options that allows you to control the version of the HTTP protocol:

  • --http0.9: Tells curl to be fine with HTTP version 0.9 response.
  • -0, --http1.0: Tells curl to use HTTP version 1.0.
  • --http1.1: Tells curl to use HTTP version 1.1.
  • --http2-prior-knowledge: Tells curl to issue its non-TLS HTTP requests using HTTP/2 without HTTP/1.1 Upgrade. It requires prior knowledge that the server supports HTTP/2 straight away.
  • --http2: Tells curl to use HTTP version 2.
like image 138
cassiomolin Avatar answered Nov 09 '22 05:11

cassiomolin