Skip to content

HTTP/2 with httpx backend #1366

@jakkdl

Description

@jakkdl
Contributor

aiohttp does not support http/2, and has no immediate plans to: aio-libs/aiohttp#320 aio-libs/aiohttp#863

likewise moto does not have plans to, as werkzeug does not support it: getmoto/moto#8904

But AWS does support it, as does httpx, so aibotocore should be able to when running with httpx as the backend. For tests it should be possible to run a local proxy server such as nginx or nghttpx to translate requests from http/2 before they're forwarded to moto.

I struggled to make progress with this in #1085, but @thehesiod noted

it's critical when using http/2 w/ httpx to not have it pre-populate the Connection header when creating the Client

in #1085 (comment)

Activity

jakkdl

jakkdl commented on May 28, 2025

@jakkdl
ContributorAuthor

this should also include a http/2 + SigV4 test (there's currently a test_presign_sigv4 in test_basic_s3)
https://github.com/aio-libs/aiobotocore/pull/1085/files/6daaa79983a468003b7429fd7d92a9c1a63e8954#r2109117717

Andarius

Andarius commented on Jun 30, 2025

@Andarius

As a side note, to be future proof (HTTP/3), it could be interesting to investigate libs like niquests.
I've been hitting some issues with httpx regarding SSE when working with LLMs, so I switched most of my projects to niquests without any real pain so fat.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @Andarius@jakkdl

        Issue actions

          HTTP/2 with httpx backend · Issue #1366 · aio-libs/aiobotocore