I'm kind of new to Ruby
and I stuck with a fairly simple task.
I would like to pass GET parameters to Faraday's request.
Here is my request function
def request
@request ||= Faraday.new do |conn|
conn.url_prefix = BASE_URL
conn.headers = @@headers
conn.request :json
conn.response :json, parser_options: { object_class: OpenStruct }
end
Then this request method is being called like so
params = {"date_to": "2021.07.07", "date_from": "2022.01.30"}
request.get(url, params).body
I've tried to retrieve params in the request method using conn.params = @request.params
But that didn' work.