Class: OAuth2::Response — Documentation by YARD 0.9.37

# Class: OAuth2::Response

Inherits:
  Object
  - Object
  - OAuth2::Response
  show all

Defined in:
  lib/oauth2/response.rb

## Overview

The Response class handles HTTP responses in the OAuth2 gem, providing methods
to access and parse response data in various formats.

Since:

- 1.0.0

## Constant Summary collapse

DEFAULT_OPTIONS =

Default configuration options for Response instances

Returns:

- (`Hash`) —

  The default options hash

Since:

- 1.0.0

      {
        parse: :automatic,
        snaky: true,
        snaky_hash_klass: SnakyHash::StringKeyed,
      }.freeze

@@parsers =

Storage for response body parser procedures

Returns:

- (`Hash<Symbol, Proc>`) —

  Hash of parser procs keyed by format symbol

Since:

- 1.0.0

      {
        query: ->(body) { Rack::Utils.parse_query(body) },
        text: ->(body) { body },
      }

@@content_types =

Maps content types to parser symbols

Returns:

- (`Hash<String, Symbol>`) —

  Hash of content types mapped to parser symbols

Since:

- 1.0.0

      {
        "application/x-www-form-urlencoded" => :query,
        "text/plain" => :text,
      }

## Instance Attribute Summary collapse

- #options ⇒ Hash

  The options hash for this instance.

- #response ⇒ Faraday::Response readonly

  The raw Faraday response object.

## Class Method Summary collapse