Catalyst::TraitFor::Request::REST man page on Pidora

Man page or keyword search:  
man Server   31170 pages
apropos Keyword Search (all sections)
Output format
Pidora logo
[printable version]

Catalyst::TraitFor::ReUsertContributed PerCatalyst::TraitFor::Request::REST(3)

NAME
       Catalyst::TraitFor::Request::REST - A role to apply to
       Catalyst::Request giving it REST methods and attributes.

SYNOPSIS
	    if ( $c->request->accepts('application/json') ) {
		...
	    }

	    my $types = $c->request->accepted_content_types();

DESCRIPTION
       This is a Moose::Role applied to Catalyst::Request that adds a few
       methods to the request object to facilitate writing REST-y code.
       Currently, these methods are all related to the content types accepted
       by the client.

METHODS
       data
	   If the request went through the Deserializer action, this method
	   will return the deserialized data structure.

       accepted_content_types
	   Returns an array reference of content types accepted by the client.

	   The list of types is created by looking at the following sources:

	   ·	   Content-type header

		   If this exists, this will always be the first type in the
		   list.

	   ·	   content-type parameter

		   If the request is a GET request and there is a "content-
		   type" parameter in the query string, this will come before
		   any types in the Accept header.

	   ·	   Accept header

		   This will be parsed and the types found will be ordered by
		   the relative quality specified for each type.

	   If a type appears in more than one of these places, it is ordered
	   based on where it is first found.

       preferred_content_type
	   This returns the first content type found. It is shorthand for:

	     $request->accepted_content_types->[0]

       accepts($type)
	   Given a content type, this returns true if the type is accepted.

	   Note that this does not do any wildcard expansion of types.

AUTHORS
       See Catalyst::Action::REST for authors.

LICENSE
       You may distribute this code under the same terms as Perl itself.

perl v5.14.2			  2012-07-Catalyst::TraitFor::Request::REST(3)
[top]

List of man pages available for Pidora

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net