Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information