Class: DPay::HTTP::Request
- Inherits:
-
Object
- Object
- DPay::HTTP::Request
- Defined in:
- lib/dpay/http/request.rb,
sig/dpay/http/request.rbs
Instance Attribute Summary collapse
-
#body ⇒ String?
readonly
Returns the value of attribute body.
-
#headers ⇒ Hash[String, String]
readonly
Returns the value of attribute headers.
-
#method ⇒ String
readonly
Returns the value of attribute method.
-
#url ⇒ String
readonly
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(method, url, headers = {}, body = nil) ⇒ Request
constructor
A new instance of Request.
Constructor Details
#initialize(method, url, headers = {}, body = nil) ⇒ Request
Returns a new instance of Request.
8 9 10 11 12 13 14 |
# File 'lib/dpay/http/request.rb', line 8 def initialize(method, url, headers = {}, body = nil) @method = method @url = url @headers = headers.freeze @body = body freeze end |
Instance Attribute Details
#body ⇒ String? (readonly)
Returns the value of attribute body.
6 7 8 |
# File 'lib/dpay/http/request.rb', line 6 def body @body end |
#headers ⇒ Hash[String, String] (readonly)
Returns the value of attribute headers.
6 7 8 |
# File 'lib/dpay/http/request.rb', line 6 def headers @headers end |
#method ⇒ String (readonly)
Returns the value of attribute method.
6 7 8 |
# File 'lib/dpay/http/request.rb', line 6 def method @method end |
#url ⇒ String (readonly)
Returns the value of attribute url.
6 7 8 |
# File 'lib/dpay/http/request.rb', line 6 def url @url end |