-
Notifications
You must be signed in to change notification settings - Fork 39
Add raw pre_send method #285
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Looks like we'll need a dedicated request type for this to work, because you can't read I think it's a good chance to pull in the |
Ok I'm going halfway with this, renaming types in I think I need to shift the |
* add raw pre_send method * introduce `http` crate for shared HTTP types
* add raw pre_send method * introduce `http` crate for shared HTTP types
* add raw pre_send method * introduce `http` crate for shared HTTP types
For #281
I've marked this as a breaking change because it depends on some breaking work done already.
Adds a
pre_send_raw
method to theSync
andAsync
clients that can be used to inspect and tweak a raw request before it goes out. This makes it convenient to do things like sign ready-to-send requests, but shouldn't be used for cases like adding simple headers or query params that should be done throughparams
.I'll add an example case and this should be ready to go.
Changes
elastic_requests
HttpRequest
toEndpoint
Url
toUrlPath
HttpMethod
and re-exporthttp::Method
elastic_responses
http::StatusCode
u16
status withStatusCode
elastic
TODO
u16
inelastic_responses
withhttp::StatusCode
(this is a bit of churn but shouldn't impact people much)Essentially I want to get a foot in the door using the sharable types from
http
.