Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does Postman support HTTP/2 requests?

I am trying to send an HTTP/2 request using Postman. However, when my server receives the request, it gives an error:

handle: <Handle _SelectorSocketTransport._read_ready()>
Traceback (most recent call last):
  File "/usr/lib64/python3.6/asyncio/events.py", line 145, in _run
    self._callback(*self._args)
  File "/usr/lib64/python3.6/asyncio/selector_events.py", line 721, in _read_ready
    self._protocol.data_received(data)
  File "/home/deesharm/jetconf/jetconf/jetconf/rest_server.py", line 76, in data_received
    events = self.conn.receive_data(data)
  File "/home/deesharm/jetconf/venv/lib/python3.6/site-packages/h2/connection.py", line 1448, in receive_data
    .. versionchanged:: 2.0.0
  File "/home/deesharm/jetconf/venv/lib/python3.6/site-packages/h2/frame_buffer.py", line 52, in add_data
    raise ProtocolError("Invalid HTTP/2 preamble.")
h2.exceptions.ProtocolError: Invalid HTTP/2 preamble.

Does Postman support HTTP/2?

like image 817
Deepak Sharma Avatar asked May 08 '26 11:05

Deepak Sharma


1 Answers

As of late 2022, Postman still does not support HTTP2.

A workaround is to click the "Code" icon (looks like </> ) to generate the cURL command, add the --http2 command line flag, then copy/paste it into the terminal:

click the code icon to get the cURL script

Works well with any mac / linux terminal as well as WSL2 on Windows. You can also provide the --verbose flag to cURL to make sure HTTP2 is working as expected.

like image 124
Will Avatar answered May 10 '26 23:05

Will



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!