lib/fullcontact/connection.rb in fullcontact-0.8.2 vs lib/fullcontact/connection.rb in fullcontact-0.9.0
- old
+ new
@@ -1,8 +1,10 @@
require 'faraday_middleware'
require 'faraday/request/gateway'
require 'faraday/response/fullcontact_errors'
+require 'faraday/response/rubyize'
+require 'faraday_middleware/response/mashify'
module FullContact
# @private
module Connection
@@ -17,10 +19,11 @@
}.merge(faraday_options)
Faraday.new(options) do |builder|
builder.use Faraday::Request::UrlEncoded
builder.use Faraday::Request::Gateway, gateway if gateway
- builder.use Faraday::Response::Rashify unless raw
+ builder.use FaradayMiddleware::Mashify unless raw
+ builder.use Faraday::Response::Rubyize unless raw
unless raw
case format.to_s.downcase
when 'json'
builder.use Faraday::Response::ParseJson
end