X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FResponse.pm;h=e3278e3b777e2e248fa4847794f283b5ecad03ee;hb=6372237c9bd3714b1c8940503ec89878fc27a3e1;hp=d22dc3c98131f22717f33d64cc9f4327c911ad2d;hpb=b22c66686d892bba76a150f727561f8778f3ea72;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst/Response.pm b/lib/Catalyst/Response.pm index d22dc3c..e3278e3 100644 --- a/lib/Catalyst/Response.pm +++ b/lib/Catalyst/Response.pm @@ -5,6 +5,11 @@ use base 'Class::Accessor::Fast'; __PACKAGE__->mk_accessors(qw/cookies headers output redirect status/); +sub content_encoding { shift->headers->content_encoding(@_) } +sub content_length { shift->headers->content_length(@_) } +sub content_type { shift->headers->content_type(@_) } +sub header { shift->headers->header(@_) } + =head1 NAME Catalyst::Response - Catalyst Response Class @@ -12,6 +17,9 @@ Catalyst::Response - Catalyst Response Class =head1 SYNOPSIS $resp = $c->response; + $resp->content_encoding; + $resp->content_length; + $resp->content_type; $resp->cookies; $resp->headers; $resp->output; @@ -29,12 +37,28 @@ response data. =over 4 +=item $resp->content_encoding + +Shortcut to $resp->headers->content_encoding + +=item $resp->content_length + +Shortcut to $resp->headers->content_length + +=item $resp->content_type + +Shortcut to $resp->headers->content_type + =item $resp->cookies Returns a reference to a hash containing the cookies. $c->response->cookies->{foo} = { value => '123' }; +=item $resp->header + +Shortcut to $resp->headers->header + =item $resp->headers Returns a L object containing the headers.