-
Notifications
You must be signed in to change notification settings - Fork 155
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
DEFAULT_TIMEOUT is not passed to Faraday connection as an option #84
Comments
Since decision-labs#55 you can't pass client options anymore (well you can but they aren't used for anything). This results in decision-labs#84 which I'm +1 on, but while it's not resolved, better to not imply anything in the docs.
I am thinking of adding support for |
@sabman support for Would these variables allow a consumer to overwrite just the |
Yes we can probably add other items too. Only thing I'd wanna ensure is avoid accidental name clashes. So maybe namespacing the environment variables with |
@sabman Could you do something similar to the elasticsearch gem? Elasticsearch::Client.new(
host: ENV.fetch("ELASTICSEARCH_HOST", nil),
user: ENV.fetch("ELASTICSEARCH_USER", nil),
password: ENV.fetch("ELASTICSEARCH_PASSWORD", nil),
request_timeout: 10
) do |faraday|
faraday.request(:instrumentation, name: "request.elasticsearch")
end Giving access to the faraday object allows you to attach own instrumentation etc. |
The issue with |
When HTTParty was replaced with Faraday (in #55) some HTTParty options were converted to constants (https://github.com/decision-labs/fcm/pull/55/files#diff-0068abed920b95db498a1c507ae5a10f86145599f5dd2431b36ccbf492d7fe7dL6-L10)
DEFAULT_TIMEOUT
andFORMAT
are now unused.It would be great to pass
DEFAULT_TIMEOUT
as an option to Faraday, example:A bonus would be to allow some way for consumers of
FCM
to be able to pass options like this in when initializing and have them passed to the underlying HTTP library.The text was updated successfully, but these errors were encountered: