Skip to content

HTTPX-based TestClient? #652

@florimondmanca

Description

@florimondmanca

Hi folks,

Currently, the TestClient is built as a subclass of requests.Session.

What would be thoughts on migrating to HTTPX?

  • Is this a good idea at all?
  • Should the TestClient be built around HTTPX, or should it eventually be replaced by HTTPX and its ASGI support?

As of today, there are definitely blockers to a full migration. An important one is that HTTPX doesn't support WebSocket yet (see encode/httpx#304), while TestClient does.

Happy to discuss! cc @tiangolo @gvbgduh @tomchristie

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions