NAME

Para::Frame::Request::Ctype - The request response content type

DESCRIPTION

You get this object by using Para::Frame::Request::Response/ctype.

new

Para::Frame::Client will mostly default to text/html and UTF-8.

set

  $ctype->set( $string )

Sets the content type to the given string. The string should be formatted as in a HTTP header. It can include several extra parameters.

The only supported extra parameter is charset, that is set using /set_charset.

The actual header is not written until after the response page has been generated.

Previous parameters will be removed.

Example:

  $ctype->set("text/plain; charset=UTF-8")

set_type

  $ctype->set_type( $type )

set_charset

  $ctype->set_charset( $charset )

Sets the charset of the content type.

There is no validation of the sting given.

charset

  $ctype->charset()

The internal working will always be in UTF8. This controls how text are sent to the client.

Returns: the current charset

type

  $ctype->type()

Returns: the current Content-Type

as_string

  $ctype->as_string

Returns a string representation of this object, suitible to be used in the HTTP header.

desig

sysdesig

is

  $ctype->is( $ctype )

is_defined

commit

AUTHOR

Jonas Liljegren <jonas@paranormal.se>

SEE ALSO

Para::Frame::Request::Response