Permalink
Browse files

relax the JSON content-type regex a bit

Closes #4
  • Loading branch information...
1 parent 40ce554 commit 4fbb7aa9a1b69e6c002b1bde1d9c44a58fbc5c03 @mislav committed Jan 10, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/faraday_stack.rb
View
@@ -42,7 +42,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|text)\/json/
+ builder.use ResponseJSON, :content_type => /[+\/]json$/
builder.use ResponseJSON::MimeTypeFix, :content_type => /text\/(plain|javascript)/
builder.use FollowRedirects
builder.response :raise_error

0 comments on commit 4fbb7aa

Please sign in to comment.