CKResponse

Class/Module:
Class
In:
lib/cgikit.rb
Parent:
CKMessage

Description

A response object that is sent to a browser by a CKAdapter object.

Getting a response object

You can get a response object by CKApplication#response or CKComponent#response.

Setting headers for a response object

To send HTTP response headers, append a pair of key and value to headers. For example,

 application.response.headers['Content-Type'] = 'text/html'

Methods

new
redirect?
set_redirect
status_line
to_s

Attributes

status [RW]
Status code in HTTP. Default status is 200 ( OK ).

Public Class Methods

new( headers = nil )

Public Instance Methods

redirect?()

Returns true if the response is setted redirect.

set_redirect( url )

Sends a temporary redirect response to the client using the specified URL.

status_line()
to_s()