Adding return JSON on specific requeest feature to template.

This commit is contained in:
Martin Kamerbeek 2009-08-10 12:42:33 +00:00
parent 5675c1a3a3
commit 46829ac970
4 changed files with 38 additions and 2 deletions

View file

@ -213,7 +213,7 @@ sub new {
my $this = shift;
my $class = ref($this) || $this;
my $headers = WebGUI::PseudoRequest::Headers->new();
my $self = {headers_out => $headers};
my $self = { headers_out => $headers, headers_in => {} };
bless $self, $class;
return $self;
}
@ -292,6 +292,19 @@ sub content_type {
#----------------------------------------------------------------------------
=head2 headers_in ( )
Mimics the behavior of Apache2::Request->headers_in.
=cut
sub headers_in {
my $self = shift;
return $self->{headers_in};
}
#----------------------------------------------------------------------------
=head2 headers_out ( )
Returns the PseudoRequst::Headers object stored in $self for access to the headers.