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?
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:
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With