package manage::Controller::rest_controller;

use strict;
use warnings;

use base 'Catalyst::Controller';


=head1 NAME

manage::Controller::rest.  A controller to test the rest action

=head1 DESCRIPTION

This is a controller made explicitly to test the rest action

=head1 METHODS

This controller uses the following methods.

=head2 rest_controller

Root of the chain for this controller.  Here to have something to
submit to.

=cut

sub rest_controller :Chained('/') CaptureArgs(0) 
{
	my ($self, $c ) = @_;
}


=head2 get

Matched the GET http request for action rest

=cut

sub get :	Chained('rest_controller') 
			PathPart('')  
			ActionClass('Rest') 
			Methods('GET')
			Args(0)
{
	my ($self, $c ) = @_;
	
	$c->response->body(<<"FORMEXAMPLE"
	
	<form method="post">
		<input type="submit">
	</form>
	
FORMEXAMPLE

	);

}


=head2 post

Matched the POST http request for action rest

=cut

sub post :	Chained('rest_controller') 
			PathPart('')  
			ActionClass('Rest') 
			Methods('POST')
			Args(0)
{
			
	my ($self, $c ) = @_;
	
	$c->response->body("You Recieved a POST");
}


=head1 AUTHOR	

John Napiorkowski

=head1 LICENSE

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

=cut


1;
