Skip to content
This repository has been archived by the owner on Oct 20, 2020. It is now read-only.

Handle application/json & text/json #2

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/faraday_stack.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def self.build(url = nil, options = {})
yield builder if block_given?
builder.use ResponseXML, :content_type => /[+\/]xml$/
builder.use ResponseHTML, :content_type => 'text/html'
builder.use ResponseJSON, :content_type => 'application/json'
builder.use ResponseJSON, :content_type => /(application|text)\/json/
builder.use FollowRedirects
builder.response :raise_error
builder.adapter Faraday.default_adapter
Expand Down