socketry / async-http

MIT License
320 stars 46 forks source link

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

Closed uberjay closed 1 year ago

uberjay commented 1 year 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