Skip to content

httpc: expose response status for streamed responses #11357

Description

@abeljim

When httpc:request/5 is used with {stream, Self}, the initial message is:

{http, {RequestId, stream_start, Headers}}

It does not include the actual HTTP status. This makes it impossible for a streaming client to distinguish responses such as 200 and 206, or to expose a structured response head before consuming body chunks.

Could httpc provide the status alongside the headers, either through a backwards-compatible option or a new streaming event shape? For example:

{http, {RequestId, stream_start, Status, Headers}}

Metadata

Metadata

Assignees

Labels

team:PSAssigned to OTP team PS

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions