New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NoMethodError: undefined method `bytesize' for #<Hash:0x007fb881de2c90> #161
Comments
You need to put adapter last in the list of middleware. |
thanks mislav! |
For anyone else having this problem I simply had to call |
Why Faraday not call to_json/to_x_www_form_urlencoded automatic according request's content type? |
@a0s it does, if you use one of the request middlewares. connection = Faraday.new(@uri) do |b|
b.request :json # This will set the "Content-Type" header to application/json and call .to_json on the body
b.adapter Faraday.default_adapter
end If you prefer to use |
@iMacTia I believe it's |
@danajackson2 you're very right! I've edited my comment above, thanks for pointing it out and sorry for the typo 🙏 ! |
trace:
request params:
connection code:
so if i do:
i receive the above error and backtrace. originally, I had the request setup as
The text was updated successfully, but these errors were encountered: