Class: ActionHook::Core::Request
- Inherits:
-
Object
- Object
- ActionHook::Core::Request
- Includes:
- Security::Headers
- Defined in:
- lib/actionhook/core/request.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#authentication ⇒ Object
Returns the value of attribute authentication.
-
#body ⇒ Object
Returns the value of attribute body.
-
#headers ⇒ Object
Returns the value of attribute headers.
-
#method ⇒ Object
Returns the value of attribute method.
-
#secret ⇒ Object
Returns the value of attribute secret.
-
#url ⇒ Object
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(url:, method: :post, body: nil, headers: {}, secret: nil, authentication: nil) ⇒ Request
constructor
A new instance of Request.
- #serialized_body ⇒ Object
- #uri ⇒ Object
Methods included from Security::Headers
Methods included from Security::Fingerprinting
Constructor Details
#initialize(url:, method: :post, body: nil, headers: {}, secret: nil, authentication: nil) ⇒ Request
Returns a new instance of Request.
10 11 12 13 14 15 16 17 |
# File 'lib/actionhook/core/request.rb', line 10 def initialize(url:, method: :post, body: nil, headers: {}, secret: nil, authentication: nil) @url = url @method = method @body = body @headers = headers || {} @secret = secret @authentication = authentication end |
Instance Attribute Details
#authentication ⇒ Object
Returns the value of attribute authentication.
8 9 10 |
# File 'lib/actionhook/core/request.rb', line 8 def authentication @authentication end |
#body ⇒ Object
Returns the value of attribute body.
8 9 10 |
# File 'lib/actionhook/core/request.rb', line 8 def body @body end |
#headers ⇒ Object
Returns the value of attribute headers.
8 9 10 |
# File 'lib/actionhook/core/request.rb', line 8 def headers @headers end |
#method ⇒ Object
Returns the value of attribute method.
8 9 10 |
# File 'lib/actionhook/core/request.rb', line 8 def method @method end |
#secret ⇒ Object
Returns the value of attribute secret.
8 9 10 |
# File 'lib/actionhook/core/request.rb', line 8 def secret @secret end |
#url ⇒ Object
Returns the value of attribute url.
8 9 10 |
# File 'lib/actionhook/core/request.rb', line 8 def url @url end |
Instance Method Details
#serialized_body ⇒ Object
19 20 21 |
# File 'lib/actionhook/core/request.rb', line 19 def serialized_body @body end |
#uri ⇒ Object
23 24 25 |
# File 'lib/actionhook/core/request.rb', line 23 def uri @uri ||= URI.parse(url) end |