Add hyper 0.12 based HTTP transport implementation #56
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is trying to move away from the now old
tokio_core
andhyper 0.11
.I'm planning on replacing
jsonrpc_client_http
completely with this new hyper 0.12 based transport. But as a transition while it's being developed I opted to keep both until we know the new one is usable. So the namenewhttp
is not something that I ever mean to publish or anything.This implementation does not support custom headers. But for our use case we should not need that any more. We previously needed it for host headers when we connected directly to IPs. But with the new DNS cache solution we should be able to connect directly to our domains and no special hacks for SNI or host header insertion should be needed.
This transport is also a lot simpler. It does not contain any "client creator" code. And no helpers for creating hyper clients. The user just have to hand us any
hyper::Client
and we'll work with that directly.This change is