Skip to content
Browse files

Parse "text/json" as well as "application/json"

  • Loading branch information...
1 parent 9823a9b commit e49c1655ce76ad8b2266ef3b4d99b22b71603082 @benschwarz benschwarz committed with Jun 10, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/faraday_stack.rb
View
2 lib/faraday_stack.rb
@@ -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

0 comments on commit e49c165

Please sign in to comment.
Something went wrong with that request. Please try again.