Catalyst::View::Component::SubInclude::HTTP 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::View::ComponUser:ContrCatalyst::View::Component::SubInclude::HTTP(3)

NAME
       Catalyst::View::Component::SubInclude::HTTP - HTTP plugin for
       C::V::Component::SubInclude

SYNOPSIS
       In your view class:

	   package MyApp::View::TT;
	   use Moose;

	   extends 'Catalyst::View::TT';
	   with 'Catalyst::View::Component::SubInclude';

	   __PACKAGE__->config(
	       subinclude_plugin => 'HTTP::GET',
	       subinclude => {
		   'HTTP::GET' => {
		       class => 'HTTP',
		       http_method => 'GET',
		       ua_timeout => '10',
		       uri_map => {
			   '/my/' => 'http://localhost:5000/',
		       },
		   },
		   'HTTP::POST' => {
		       class => 'HTTP',
		       http_method => 'POST',
		       ua_timeout => '10',
		       uri_map => {
			   '/foo/' => 'http://www.foo.com/',
		       },
		   },
	       },
	   );

       Then, somewhere in your templates:

	   [% subinclude('/my/widget') %]
	   ...
	   [% subinclude_using('HTTP::POST', '/foo/path', { foo => 1 }) %]

DESCRIPTION
       "Catalyst::View::Component::SubInclude::HTTP" does HTTP requests
       (currently using LWP::UserAgent) and uses the responses to render
       subinclude contents.

CONFIGURATION
       The configuration is passed in the "subinclude" key based on your
       plugin name which can be arbitrary.

       class
	   Required just in case your plugin name differs from "HTTP".

       http_method
	   Accepts "GET" and "POST" as values. The default one is "GET".

       user_agent
	   This lazily builds a LWP::UserAgent obj, however you can pass a
	   different user agent obj that implements the required API.

       ua_timeout
	   User Agent's timeout config param. Defaults to 10 seconds.

       uri_map
	   This expects a HashRef in order to map paths to different URLs.

       base_url
	   Used only if "uri_map" is "undef" and defaults to
	   "$c->request->base".

METHODS
   "generate_subinclude( $c, $path, $args )"
       Note that $path should be the relative path.

SEE ALSO
       Catalyst::View::Component::SubInclude

AUTHOR
       Wallace Reis "<wreis@cpan.org>"

SPONSORSHIP
       Development sponsored by Ionzero LLC <http://www.ionzero.com/>.

COPYRIGHT & LICENSE
       Copyright (c) 2010 Wallace Reis.

       This program is free software; you can redistribute it and/or modify it
       under the same terms as Perl itself.

perl v5.14.1			Catalyst::View::Component::SubInclude::HTTP(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