Method: Faraday::Request::UrlEncoded#call
- Defined in:
- lib/faraday/request/url_encoded.rb
#call(env) ⇒ Object
Encodes as "application/x-www-form-urlencoded" if not already encoded or of another type.
20 21 22 23 24 25 26 |
# File 'lib/faraday/request/url_encoded.rb', line 20 def call(env) match_content_type(env) do |data| params = Faraday::Utils::ParamsHash[data] env.body = params.to_query(env.params_encoder) end @app.call env end |