Module: Tilia::Http::ResponseInterface
- Includes:
- MessageInterface
- Included in:
- Response, ResponseDecorator
- Defined in:
- lib/tilia/http/response_interface.rb
Overview
This interface represents a HTTP response.
Instance Method Summary collapse
-
#status ⇒ Object
Returns the current HTTP status code.
-
#status=(_status) ⇒ void
Sets the HTTP status code.
-
#status_text ⇒ String
Returns the human-readable status string.
Methods included from MessageInterface
#add_header, #add_headers, #body, #body=, #body_as_stream, #body_as_string, #header, #header?, #header_as_array, #headers, #http_version, #http_version=, #remove_header, #update_header, #update_headers
Instance Method Details
#status ⇒ Object
Returns the current HTTP status code.
10 11 |
# File 'lib/tilia/http/response_interface.rb', line 10 def status end |
#status=(_status) ⇒ void
This method returns an undefined value.
Sets the HTTP status code.
This can be either the full HTTP status code with human readable string, for example: “403 I can’t let you do that, Dave”.
Or just the code, in which case the appropriate default message will be added.
32 33 |
# File 'lib/tilia/http/response_interface.rb', line 32 def status=(_status) end |
#status_text ⇒ String
Returns the human-readable status string.
In the case of a 200, this may for example be ‘OK’.
18 19 |
# File 'lib/tilia/http/response_interface.rb', line 18 def status_text end |