Method: HTTPX::Transcoder::JSON.decode
- Defined in:
- lib/httpx/transcoder/json.rb
.decode(response) ⇒ Object
46 47 48 49 50 51 52 |
# File 'lib/httpx/transcoder/json.rb', line 46 def decode(response) content_type = response.content_type.mime_type raise HTTPX::Error, "invalid json mime type (#{content_type})" unless JSON_REGEX.match?(content_type) method(:json_load) end |