Skip to content

Use HTTP/2 instead of 1.1 #587

@betelgeuse

Description

@betelgeuse

Feature Request

Is your feature request related to a problem? Please describe.

Currently requests are done with HTTP 1.1:

>>> client.servers.get_all()
2025-11-11 13:25:32,402 - urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): api.hetzner.cloud:443
2025-11-11 13:25:32,630 - urllib3.connectionpool - DEBUG - https://api.hetzner.cloud:443 "GET /v1/servers?page=1&per_page=50 HTTP/1.1" 200 178

Describe the solution you'd like

The requests should use HTTP 2 for better performance as the servers do support it

$ curl -i https://api.hetzner.cloud
HTTP/2 404 

Describe alternatives you've considered

Staying with HTTP 1.1 and accepting worse performance.

Teachability, Documentation, Adoption, Migration Strategy

urllib3 underpinning requests does not support HTTP 2 so this requests switching the library.

https://github.com/urllib3/urllib3/milestone/10

Here httpx is suggested as an alternative. Would it be acceptable?

https://webscraping.ai/faq/urllib3/can-i-use-urllib3-with-http-2-protocol

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions