Class: Cafmal::Request::Post
- Inherits:
-
Object
- Object
- Cafmal::Request::Post
- Defined in:
- lib/cafmal/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
Returns a new instance of Post.
12 13 14 15 |
# File 'lib/cafmal/request.rb', line 12 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.
10 11 12 |
# File 'lib/cafmal/request.rb', line 10 def code @code end |
#response ⇒ Object (readonly)
Returns the value of attribute response.
9 10 11 |
# File 'lib/cafmal/request.rb', line 9 def response @response end |