I'm using Faraday with token authentication and unable to configure it to get the response.
So far i'm writing it like this
conn = Faraday.new(url: url) do |faraday|
faraday.token_auth(ENV.fetch('API_TOKEN'))
faraday.adapter Faraday.default_adapter
end
And when i'm using the conn
object to get the response it is responding in a different manner like this
conn.response
ArgumentError (wrong number of arguments (given 0, expected 1+))
I'm not sure what i am missing here.