Skip to content
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

Redo http transport #497

Merged
merged 2 commits into from
Jun 8, 2021
Merged

Redo http transport #497

merged 2 commits into from
Jun 8, 2021

Commits on Jun 7, 2021

  1. Redo http transport

    The existing implementation has accumulated a lot of crust from initial
    async support and use of hyper. Now that is using reqwest we can do many
    things simpler.
    
    Removed things that were needed for hyper but are handled already by
    reqwest:
    - setting the proxy
    - setting the auth header
    - setting the content type header
    - setting content length header
    
    Other changes:
    - Move from struct with Future impl to BoxFuture. We were already using
    BoxFuture internally anyawy.
    - Log request and response as debug strings. This makes sure no control
    characters like newlines end up in the output.
    - Use from_utf8_lossy for the response log so that we can still
    partially log non utf8 responses.
    - Fix not handling batch responses according to the jsonrpc
    specification which does not guarantee the ordering of the list.
    - Add more context to error logs.
    - Allow giving a custom client to the transport. This is useful for
    example to set a timeout.
    e00E committed Jun 7, 2021
    Configuration menu
    Copy the full SHA
    ee34253 View commit details
    Browse the repository at this point in the history
  2. Apply suggestions from code review

    Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com>
    e00E and tomusdrw authored Jun 7, 2021
    Configuration menu
    Copy the full SHA
    d6e1f52 View commit details
    Browse the repository at this point in the history