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

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

#statusObject

Returns the current HTTP status code.

Returns:

  • int



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.

Parameters:

  • status (String, Fixnum)


32
33
# File 'lib/tilia/http/response_interface.rb', line 32

def status=(_status)
end

#status_textString

Returns the human-readable status string.

In the case of a 200, this may for example be ‘OK’.

Returns:

  • (String)


18
19
# File 'lib/tilia/http/response_interface.rb', line 18

def status_text
end