lib/hull/connection.rb in hullio-0.3.0 vs lib/hull/connection.rb in hullio-0.3.1
- old
+ new
@@ -1,7 +1,8 @@
require 'faraday'
require 'hull/request/auth'
+require 'hull/response/parse_json'
require 'faraday_middleware/response/parse_json'
require 'faraday_middleware/response/caching'
module Hull
module Connection
@@ -25,10 +26,10 @@
}
@connection ||= Faraday.new(default_options.deep_merge(connection_options)) do |builder|
builder.use Hull::Request::Auth, credentials
builder.use Faraday::Request::UrlEncoded
builder.use FaradayMiddleware::Caching, cache_store unless cache_store.nil?
- builder.use FaradayMiddleware::ParseJson
+ builder.use Hull::Response::ParseJson
builder.use Faraday::Response::RaiseError
builder.adapter(adapter)
end
end
end