-
Notifications
You must be signed in to change notification settings - Fork 221
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
setup middleware pipeline for Ruby request adapter #1650
Comments
As NET::HTTP does not offer support for defining and injecting middleware handlers, there may be a suitable middleware that can be easily added on. I found these libraries: Excon |
Middleware |
After some additional research we decided to adopt faraday for the time being.
Some supporting evidence https://www.scrapingbee.com/blog/best-ruby-http-clients/ (Hey Osose in case you're watching, the research and the work you've done on Ruby helped a lot! 👋) |
related #120
related #635
To implement cross cutting concerns (like retrying on transient errors) we need the current http client to support middleware handlers, that is intercepting and change the request before it's sent over the wire, and the response before it's returned to the caller.
The first step here is to check the documentation of the client we're currently using to see whether it supports two things:
If it doesn't, we should design an overhead API for the native client that offers similar methods prototypes (what we did with TypeScript & fetch).
Additionally:
The text was updated successfully, but these errors were encountered: