diff --git a/lib/faraday/request.rb b/lib/faraday/request.rb index 9a97ba79b..d139727b8 100644 --- a/lib/faraday/request.rb +++ b/lib/faraday/request.rb @@ -132,6 +132,7 @@ def to_env(connection) require 'faraday/request/authorization' require 'faraday/request/instrumentation' +require 'faraday/request/json' require 'faraday/request/multipart' require 'faraday/request/retry' require 'faraday/request/url_encoded' diff --git a/lib/faraday/request/json.rb b/lib/faraday/request/json.rb index a17a4dd06..4b0b1c0c4 100644 --- a/lib/faraday/request/json.rb +++ b/lib/faraday/request/json.rb @@ -51,3 +51,5 @@ def request_type(env) end end end + +Faraday::Request.register_middleware(json: Faraday::Request::Json) \ No newline at end of file diff --git a/lib/faraday/response.rb b/lib/faraday/response.rb index 505e4ea43..3dd1bc520 100644 --- a/lib/faraday/response.rb +++ b/lib/faraday/response.rb @@ -85,5 +85,6 @@ def apply_request(request_env) end end +require 'faraday/response/json' require 'faraday/response/logger' require 'faraday/response/raise_error'