Skip to content
masterclass Buddy

HTTPX · Method

client.stream

AsyncClient.stream() lets an async program consume an HTTP response piece by piece. Use it with async with, then read chunks, text, lines, or raw bytes through async response methods.

Last updated

Syntax

async with client.stream(method, url, ...) as response:

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • AsyncClient
  • Response.aread()
  • Response.aiter_bytes()
  • Response.aiter_text()
  • Response.aiter_lines()
  • Response.aiter_raw()
  • Response.aclose()
  • client.send(..., stream=True)

Source: Async Support - HTTPX. Checked 2026-11-03.