Class: SimpleOAuth::OAuth2::Request
- Inherits:
-
Object
- Object
- SimpleOAuth::OAuth2::Request
- Defined in:
- lib/simple_oauth/oauth2/request.rb,
sig/simple_oauth/oauth2.rbs
Overview
An HTTP request to an OAuth 2.0 endpoint, built but not sent
Instance Attribute Summary collapse
-
#body ⇒ String
readonly
The form-encoded request body.
-
#headers ⇒ Hash{String => String}
readonly
The request headers.
-
#method ⇒ String
readonly
The HTTP method.
-
#url ⇒ String
readonly
The endpoint URL.
Instance Method Summary collapse
-
#initialize(method:, url:, headers:, body:) ⇒ Request
constructor
Initialize a new request.
Constructor Details
#initialize(method:, url:, headers:, body:) ⇒ Request
Initialize a new request
52 53 54 55 56 57 58 |
# File 'lib/simple_oauth/oauth2/request.rb', line 52 def initialize(method:, url:, headers:, body:) @method = method @url = url @headers = headers.dup.freeze @body = body freeze end |
Instance Attribute Details
#body ⇒ String (readonly)
The form-encoded request body
41 42 43 |
# File 'lib/simple_oauth/oauth2/request.rb', line 41 def body @body end |
#headers ⇒ Hash{String => String} (readonly)
The request headers
33 34 35 |
# File 'lib/simple_oauth/oauth2/request.rb', line 33 def headers @headers end |
#method ⇒ String (readonly)
The HTTP method
17 18 19 |
# File 'lib/simple_oauth/oauth2/request.rb', line 17 def method @method end |
#url ⇒ String (readonly)
The endpoint URL
25 26 27 |
# File 'lib/simple_oauth/oauth2/request.rb', line 25 def url @url end |