Is there a way to add timeout options in this simple get method?
I am using Faraday 3.3.
Faraday.get(url)
After searching around, I can only apply timeout options after I initiate a connection first, then apply timeout options. Or there's a simple way?
This is what I am doing right now:
conn = Faraday.new
response = conn.get do |req|
req.url url
req.options.timeout = 2 # 2 seconds
end