Class | OAuth2::Response |
In: |
lib/oauth2/response.rb
|
Parent: | Object |
OAuth2::Response class
PARSERS | = | { :json => lambda{|body| MultiJson.decode(body) rescue body }, :query => lambda{|body| Rack::Utils.parse_query(body) }, :text => lambda{|body| body} | Procs that, when called, will parse a response body according to the specified format. | |
CONTENT_TYPES | = | { 'application/json' => :json, 'text/javascript' => :json, 'application/x-www-form-urlencoded' => :query, 'text/plain' => :text | Content type assignments for various potential HTTP content types. |
error | [RW] | |
options | [RW] | |
response | [R] |
Initializes a Response instance
@param [Faraday::Response] response The Faraday response instance @param [Hash] opts options in which to initialize the instance @option opts [Symbol] :parse (:automatic) how to parse the response body. one of :query (for x-www-form-urlencoded),
:json, or :automatic (determined by Content-Type response header)