Apache2-REST
view release on metacpan or search on metacpan
Revision history for Apache2-REST
0.07_01
Added support for streaming and multipart responses.
Added Scott Thoman in authors.
0.06
Added options for error output.
Log errors server side by using log_error (and Apache2::Log)
0.05 24 Nov 2009
Remove pod coverage to avoid build failure.
due to Apache2::const::*
Return 401 HTTP code when method unauthorized
lib/Apache2/REST/Handler/stream.pm view on Meta::CPAN
use base qw/Apache2::REST::Handler/ ;
use Apache2::REST::Stream::TestStream;
use Apache2::Const qw(
:common :http
);
=head2 NAME
Apache2::REST::Handler::stream - test handler access '/test/stream' to test a streaming response
=cut
=head2 GET
Sets the response as a streaming one and returns OK on get.
=cut
sub GET{
my ($self, $req , $resp ) = @_ ;
if ( $req->param('die') ){
die "This is an error\n" ;
}
$resp->data()->{'test_mess'} = 'This is a GET test message on a streaming ressource' ;
$resp->stream(Apache2::REST::Stream::TestStream->new($req->param('chunks') || 10));
## It is OK
return Apache2::Const::HTTP_OK ;
}
=head2 isAuth
Any method is allowed
=cut
lib/Apache2/REST/Writer/xml_stream.pm view on Meta::CPAN
package Apache2::REST::Writer::xml_stream ;
use strict ;
use XML::Simple ;
use base qw/Apache2::REST::WriterStream/;
use Data::Dumper ;
=head1 NAME
Apache2::REST::Writer::xml_stream - Apache2::REST::Response Writer for streaming xml
=cut
=head1 METHODS
=head2 new
=cut
sub new{
lib/Apache2/REST/Writer/yaml_stream.pm view on Meta::CPAN
package Apache2::REST::Writer::yaml_stream;
use strict ;
use YAML;
use Data::Dumper ;
use base qw/Apache2::REST::WriterStream/;
=head1 NAME
Apache2::REST::Writer::yaml_stream - Apache2::REST::Response Writer for streaming yaml
=cut
=head2 new
=cut
sub new{
my ( $class ) = @_;
return bless {} , $class;
( run in 0.325 second using v1.01-cache-2.11-cpan-4d50c553e7e )