You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to note a grab bag of minor usability nits to see whether the maintainer(s) care about them and/or agree with my suggestions. These would involve changing or adding to public API so there are meaningful maintainability considerations here.
making clients import both bhttp and ohttp is a chore. Is anyone ever going to use ohttp without bhttp? In particular, this is annoying because I wind up having to define separate enum variants in my error type for ohttp::Error and bhttp::Error, as does glean/Viaduct.
bhttp has its own bhttp::StatusCode which is an alias for u16. What if this was http::StatusCode instead? Or perhaps there's a good reason that bhttp/ohttp avoid depending on crate http.
Continuing from that, it'd be nice to have adapters from things like bhttp::Message to things like http::Response or http::Request. These would be easy to gate behind a feature if there's a concern about dragging http into everyone's Cargo.lock.
decapsulating responses requires unnecessary ceremony in the common case where the response is small and I have the whole thing in memory. See glean/Viaduct: you already have the whole encapsulated response in memory, so it'd be nice to have a one-shot call on ClientResponse that does the Cursor dance for you and spits out a [Message] (or, in the context of Handling ControlData::Request when decapsulating responses is awkward #66, a more specific response type).
I want to note a grab bag of minor usability nits to see whether the maintainer(s) care about them and/or agree with my suggestions. These would involve changing or adding to public API so there are meaningful maintainability considerations here.
bhttpandohttpis a chore. Is anyone ever going to useohttpwithoutbhttp? In particular, this is annoying because I wind up having to define separate enum variants in my error type forohttp::Errorandbhttp::Error, as does glean/Viaduct.bhttphas its ownbhttp::StatusCodewhich is an alias foru16. What if this washttp::StatusCodeinstead? Or perhaps there's a good reason thatbhttp/ohttpavoid depending on cratehttp.bhttp::Messageto things likehttp::Responseorhttp::Request. These would be easy to gate behind a feature if there's a concern about dragginghttpinto everyone'sCargo.lock.ClientResponsethat does theCursordance for you and spits out a [Message] (or, in the context of HandlingControlData::Requestwhen decapsulating responses is awkward #66, a more specific response type).