I'm trying to customize stubs via Faraday and have a little problem with setting request_body and request_headers. All test works and are green, but I'm still getting message by Rubymine: „Found extra argument“ and that part of the code is underlined in red. I would like to get rid of it. Just how to customize body and headers in right way, please?
Actual problem
I have tried to customize it like this:
conn = Faraday.new(url: "url") do |faraday|
faraday.response :raise_error
end
conn.get("url") do |req|
req.body: {body: "body"}
req.headers: {headers: "headers"}
end
But it did not work.