psf / requests

A simple, yet elegant, HTTP library.
https://requests.readthedocs.io/en/latest/
Apache License 2.0
51.6k stars 9.23k forks source link

not support HTTP2 header #6691

Closed geebadan closed 1 month ago

geebadan commented 1 month ago

not support http2 header

example:

import requests
from hyper.contrib import HTTP20Adapter

headers={':path': '/hello}'

s = requests.Session()
s.mount('https://http2bin.org', HTTP20Adapter())
r = s.get('https://http2bin.org/get', headers=headers)
print(r.status_code)

# raise Invalid leading whitespace, reserved character(s), or return character(s) in header name: ':path'
sigmavirus24 commented 1 month ago

This is a duplicate