Class: Praxis::Responses::Created
- Inherits:
-
Praxis::Response
- Object
- Praxis::Response
- Praxis::Responses::Created
- Defined in:
- lib/praxis/responses/http.rb
Overview
The request has been fulfilled and resulted in a new resource being created.
Instance Attribute Summary
Attributes inherited from Praxis::Response
#body, #headers, #name, #parts, #request, #status
Instance Method Summary collapse
-
#initialize(status: self.class.status, headers: {}, body: '', location: nil) ⇒ Created
constructor
A new instance of Created.
Methods inherited from Praxis::Response
#add_part, #content_type, #content_type=, #encode!, #finish, #format!, #handle, inherited, #response_name, #validate
Constructor Details
#initialize(status: self.class.status, headers: {}, body: '', location: nil) ⇒ Created
Returns a new instance of Created.
22 23 24 25 |
# File 'lib/praxis/responses/http.rb', line 22 def initialize(status:self.class.status, headers:{}, body:'', location: nil) super(status: status, headers: headers, body: body) headers['Location'] = location if location end |