uv
b47f7091 - puffin-client: simplify use of http-cache-semantics (#1197)

Commit
1 year ago
puffin-client: simplify use of http-cache-semantics (#1197) The `http-cache-semantics` crate is polymorphic on the types of requests and responses it accepts. We had previously been explicitly converting between `http` and `reqwest` types, but this isn't necessary. We can provide impls of the traits in `http-cache-semantics` for `reqwest`'s types (via a wrapper). This saves us from the awkward request/response type conversions. While this does clone the request, this is: 1. Not new. We were previously cloning the request to do the conversion. 2. An artifact (I believe) of http-cache-semantics API. (It kind of seems like an API bug to me?) There is also a little bit of messiness around inter-operating between http::uri::Uri and url::Url. But overall shouldn't be a big deal.
Author
Parents
Loading