AnyEvent-HTTPD
view release on metacpan or search on metacpan
* with version 0.8 no more dependend on LWP for HTTP::Date.
* (limited) support for SSL
METHODS
The AnyEvent::HTTPD class inherits directly from
AnyEvent::HTTPD::HTTPServer which inherits the event callback interface
from Object::Event.
Event callbacks can be registered via the Object::Event API (see the
documentation of Object::Event for details).
For a list of available events see below in the *EVENTS* section.
new (%args)
This is the constructor for a AnyEvent::HTTPD object. The %args hash
may contain one of these key/value pairs:
host => $host
The TCP address of the HTTP server will listen on. Usually
request_class => $class
This is a special parameter that you can use to pass your own
request class to AnyEvent::HTTPD. This is only of interest to
you if you plan to subclass AnyEvent::HTTPD::Request.
allowed_methods => $arrayref
This parameter sets the allowed HTTP methods for requests,
defaulting to GET, HEAD and POST. Each request received is
matched against this list, and a '501 not implemented' is
returned if no match is found. Requests using disallowed
handlers will never trigger callbacks.
port
Returns the port number this server is bound to.
host
Returns the host/ip this server is bound to.
allowed_methods
Returns an arrayref of allowed HTTP methods, possibly as set by the
allowed_methods argument to the constructor.
lib/AnyEvent/HTTPD.pm view on Meta::CPAN
=item * (limited) support for SSL
=back
=head1 METHODS
The L<AnyEvent::HTTPD> class inherits directly from
L<AnyEvent::HTTPD::HTTPServer> which inherits the event callback interface from
L<Object::Event>.
Event callbacks can be registered via the L<Object::Event> API (see the
documentation of L<Object::Event> for details).
For a list of available events see below in the I<EVENTS> section.
=over 4
=item B<new (%args)>
This is the constructor for a L<AnyEvent::HTTPD> object.
The C<%args> hash may contain one of these key/value pairs:
lib/AnyEvent/HTTPD.pm view on Meta::CPAN
This is a special parameter that you can use to pass your own request class
to L<AnyEvent::HTTPD>. This is only of interest to you if you plan
to subclass L<AnyEvent::HTTPD::Request>.
=item allowed_methods => $arrayref
This parameter sets the allowed HTTP methods for requests, defaulting to GET,
HEAD and POST. Each request received is matched against this list, and a
'501 not implemented' is returned if no match is found. Requests using
disallowed handlers will never trigger callbacks.
=back
=cut
sub new {
my $this = shift;
my $class = ref($this) || $this;
my $self = $class->SUPER::new (
request_class => "AnyEvent::HTTPD::Request",
lib/AnyEvent/HTTPD/Request.pm view on Meta::CPAN
package AnyEvent::HTTPD::Request;
use common::sense;
=head1 NAME
AnyEvent::HTTPD::Request - A web application request handle for L<AnyEvent::HTTPD>
=head1 DESCRIPTION
This is the request object as generated by L<AnyEvent::HTTPD> and given
in the request callbacks.
=head1 METHODS
=over 4
=cut
sub new {
my $this = shift;
my $class = ref($this) || $this;
( run in 0.333 second using v1.01-cache-2.11-cpan-d6f9594c0a5 )