Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

More lenient parsing

  • Loading branch information...
commit 13ee6042bad2f8800543ca5d383ed23fc4fb7fbb 1 parent 7dc64bd
@sferik sferik authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/faraday/parse.rb
View
4 lib/faraday/parse.rb
@@ -11,9 +11,9 @@ def self.register_on_complete(env)
env[:response].on_complete do |response|
response[:body] = begin
case response[:response_headers].values_at('content-type', 'Content-Type').first
- when /application\/json/
+ when /\/json/
parse_json(response[:body])
- when /application\/xml/
+ when /\/xml/
parse_xml(response[:body])
else
''
Please sign in to comment.
Something went wrong with that request. Please try again.