Skip to content

[Feature Request]: Streaming Support #39

Open
@gzzhongqi

Description

@gzzhongqi

Describe the feature / enhancement and how it would improve things

Can you add support to streaming since that is really useful? Thanks!

Describe how your proposal will work, with code and/or pseudo-code

client = httpx.AsyncClient(timeout=timeout)
try:
async with client.stream(method='GET', url=full_api_endpoint, timeout=timeout) as response:
if response.status_code == 200:
async for line in response.aiter_lines():
yield json.loads(line)

Probably like how httpx handles it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions