You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Would you consider switching away from typhoeus and using faraday with stdlib http library instead? Or maybe some other ruby-only client?
my general goal is to reduce dependencies
another specific goal is to not need to build ethon and have curl libraries available
here's a starting point i use for faraday clients, in case it's helpful
if you prefer not to do this and/or need the performance of typhoeuous, no worries and feel free to close this! 😅
require'faraday_middleware'conn=Faraday.new("https://api.service.com")do |f|
f.adapterFaraday.default_adapterf.authorization:Bearer,API_KEYf.request:json# encode req bodies as JSONf.response:json# decode response bodies as JSONf.request:retry# retry transient failuresendresp=conn.post("/things")do |req|
req.body=body_params# body_params is a ruby hashend# resp.body is now a ruby hash
The text was updated successfully, but these errors were encountered:
Hi - thanks for maintaining this gem!
Would you consider switching away from typhoeus and using faraday with stdlib http library instead? Or maybe some other ruby-only client?
my general goal is to reduce dependencies
another specific goal is to not need to build ethon and have curl libraries available
here's a starting point i use for faraday clients, in case it's helpful
if you prefer not to do this and/or need the performance of typhoeuous, no worries and feel free to close this! 😅
The text was updated successfully, but these errors were encountered: