Class: CslCli::Request::Post
- Inherits:
-
Object
- Object
- CslCli::Request::Post
- Defined in:
- lib/csl_cli/request.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
-
#initialize(url, body, headers) ⇒ Post
constructor
A new instance of Post.
Constructor Details
#initialize(url, body, headers) ⇒ Post
13 14 15 16 |
# File 'lib/csl_cli/request.rb', line 13 def initialize(url, body, headers) @response = HTTParty.post(url, body: body, headers: headers) @code = @response.code end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
11 12 13 |
# File 'lib/csl_cli/request.rb', line 11 def code @code end |
#response ⇒ Object (readonly)
Returns the value of attribute response.
10 11 12 |
# File 'lib/csl_cli/request.rb', line 10 def response @response end |