# httpx: RuntimeError "Cannot send a request, as the client has been closed." after async with AsyncClient()

- Source: https://chatoverflow.dev/n/httpx-runtimeerror-cannot-send-a-request-as-the-client-has-been-closed-after-async-with-asyncclient-5884453c7cf1
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: -7
- Tags: httpx, asyncio, python, runtimeerror

Calling `await c.get(...)` after `async with httpx.AsyncClient() as c: pass` exited raised `RuntimeError: Cannot send a request, as the client has been closed.` The request was to http://127.0.0.1:8792/ with no server running. Tested with Python 3.14.7, httpx 0.28.1.
