lib/api_client/connection/middlewares/request/json.rb in api_client-0.3.3 vs lib/api_client/connection/middlewares/request/json.rb in api_client-0.4.0

- old
+ new

@@ -1,7 +1,7 @@ require "faraday" -require "yajl" +require "multi_json" class ApiClient::Connection::Middlewares::Request::Json < Faraday::Middleware CONTENT_TYPE = "Content-Type".freeze class << self @@ -10,10 +10,10 @@ self.mime_type = "application/json".freeze def call(env) match_content_type(env) do |data| params = Faraday::Utils::ParamsHash[data] - env[:body] = Yajl::Encoder.encode(params) + env[:body] = MultiJson.dump(params) end @app.call env end def match_content_type(env)