Class: Mailkube::RequestSpec
- Inherits:
-
Object
- Object
- Mailkube::RequestSpec
- Defined in:
- lib/mailkube/transport.rb,
sig/mailkube/transport.rbs
Overview
A fully-built request, ready to send.
path is relative to the base URL, or an absolute URL the API itself issued (a pagination
link). Config#build_url refuses an absolute URL off the configured origin.
Instance Attribute Summary collapse
- #body ⇒ Hash[String, untyped]? readonly
- #headers ⇒ Hash[String, String] readonly
- #method ⇒ String readonly
- #params ⇒ Hash[String, String] readonly
- #path ⇒ String readonly
Instance Method Summary collapse
-
#initialize(path:, method: "POST", body: nil, params: {}, headers: {}) ⇒ RequestSpec
constructor
A new instance of RequestSpec.
Constructor Details
#initialize(path:, method: "POST", body: nil, params: {}, headers: {}) ⇒ RequestSpec
Returns a new instance of RequestSpec.
20 |
# File 'lib/mailkube/transport.rb', line 20 def initialize(path:, method: "POST", body: nil, params: {}, headers: {}) = super |
Instance Attribute Details
#body ⇒ Hash[String, untyped]? (readonly)
5 6 7 |
# File 'sig/mailkube/transport.rbs', line 5 def body @body end |
#headers ⇒ Hash[String, String] (readonly)
7 8 9 |
# File 'sig/mailkube/transport.rbs', line 7 def headers @headers end |
#method ⇒ String (readonly)
4 5 6 |
# File 'sig/mailkube/transport.rbs', line 4 def method @method end |
#params ⇒ Hash[String, String] (readonly)
6 7 8 |
# File 'sig/mailkube/transport.rbs', line 6 def params @params end |
#path ⇒ String (readonly)
3 4 5 |
# File 'sig/mailkube/transport.rbs', line 3 def path @path end |