$c->finalize_error;
}
- if ( !$c->response->output && $c->response->status !~ /^(1|3)\d\d$/ ) {
+ if ( !$c->response->body && $c->response->status !~ /^(1|3)\d\d$/ ) {
$c->finalize_error;
}
- if ( $c->response->output && !$c->response->content_length ) {
+ if ( $c->response->body && !$c->response->content_length ) {
use bytes; # play safe with a utf8 aware perl
- $c->response->content_length( length $c->response->output );
+ $c->response->content_length( length $c->response->body );
}
my $status = $c->finalize_headers;
$name = '';
}
- $c->res->output( <<"" );
+ $c->res->body( <<"" );
<html>
<head>
<title>$title</title>
sub finalize_body {
my $c = shift;
- $c->apache->print( $c->response->output );
+ $c->apache->print( $c->response->body );
}
=item $c->prepare_body
$content .= $buffer;
}
- $c->request->input($content);
+ $c->request->body($content);
}
=item $c->prepare_connection
# application/x-www-form-urlencoded or multipart/form-data
# CGI.pm will read STDIN into a param, POSTDATA.
- $c->request->input( $c->cgi->param('POSTDATA') );
+ $c->request->body( $c->cgi->param('POSTDATA') );
}
=item $c->prepare_connection
sub finalize_body {
my $c = shift;
- $c->http->response->content( $c->response->output );
+ $c->http->response->content( $c->response->body );
}
=item $c->finalize_headers
sub prepare_body {
my $c = shift;
- $c->request->input( $c->http->request->content );
+ $c->request->body( $c->http->request->content );
}
=item $c->prepare_connection
use base 'Class::Accessor::Fast';
__PACKAGE__->mk_accessors(
- qw/action address arguments base cookies headers input hostname match
+ qw/action address arguments body base cookies headers hostname match
method parameters path snippets uploads/
);
*args = \&arguments;
+*input = \&body;
*params = \¶meters;
sub content_encoding { shift->headers->content_encoding(@_) }
=item $req->body
-Shortcut for $req->input.
+Contains the message body of the request unless Content-Type is
+C<application/x-www-form-urlencoded> or C<multipart/form-data>.
+
+ print $c->request->body
=item $req->content_encoding
=item $req->input
-Contains the message body of the request unless Content-Type is
-C<application/x-www-form-urlencoded> or C<multipart/form-data>.
-
- print $c->request->input
+Shortcut for $req->body.
=item $req->match
use strict;
use base 'Class::Accessor::Fast';
-__PACKAGE__->mk_accessors(qw/cookies headers output redirect status/);
+__PACKAGE__->mk_accessors(qw/cookies body headers redirect status/);
+
+*output = \&body;
sub content_encoding { shift->headers->content_encoding(@_) }
sub content_length { shift->headers->content_length(@_) }
=over 4
-=item $resp->body
+=item $resp->body($text)
+
+ $c->response->body('Catalyst rocks!');
-Shortcut for $resp->output.
+Contains the final output.
=item $resp->content_encoding
$c->response->headers->header( 'X-Catalyst' => $Catalyst::VERSION );
-=item $resp->output($text)
-
-Contains the final output.
+=item $resp->output
- $c->response->output('Catalyst rocks!');
+Shortcut to $resp->body
=item $resp->redirect($url)