socketry / async-http

MIT License
298 stars 45 forks source link

Save reason phrase in Protocol::HTTP1::Response #146

Closed uberjay closed 8 months ago

uberjay commented 8 months ago

Save away the raw reason phrase provided by the server. This is of limited niche value, as the reason phrase seems to be mostly unused/ignored.

One example of where it's needed:

The Proxmox VE API ships error reason strings back using the HTTP reason phrase. Without this side-channel, error status is 100% opaque/unavailable.

See (very brief) discussion: https://github.com/socketry/async-http/discussions/145

It's probably not worth overthinking this, but some other thoughts that came to mind were:

Types of Changes

Contribution