TWiki::Response
Class to encapsulate response data.
Fields:
* status
- response status
* headers
- hashref to response headers
* body
- response body
* cookies
- hashref to response cookies
Constructs a TWiki::Response object.
Gets/Sets response status.
$status
is a three digit code, optionally followed by a status string
Gets/Sets response charset. If not defined, defaults to ISO-8859-1, just like CGI.pm
Sets response header. Resonably compatible with CGI. Doesn't support -nph, -target and -p3p.
Private method to set response header like above that doesn't include fix for Item6602. Resonably compatible with CGI. Doesn't support -nph, -target and -p3p.
Gets/Sets all response headers. Keys are headers name and values are scalars for single-valued headers or arrayref for multivalued ones.
If called without parameters returns all present header names, otherwise returns a list (maybe with a single element) of values associated with $name.
Deletes headers whose names are passed.
Adds $value to list of values associated with header $name.
Gets/Sets response cookies. Parameter, if passed, must be an arrayref.
Elements may be CGI::Cookie objects or raw cookie strings.
Gets/Sets response body.
Populate object with redirect response headers.
$uri
must be passed. Others are optional.
CGI Compatibility Note: It doesn't support -target or -nph
Sets the header, this does not modify the existing key=>value from $this->{headers}. Sets only new values.
|
Copyright © 1999-2025 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Daya Bay? Send feedback Note: Please contribute updates to this topic on TWiki.org at TWiki:TWiki.TWikiResponseDotPm. |