summaryrefslogtreecommitdiffstats
path: root/lib/Plack/Client/Backend/http.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Plack/Client/Backend/http.pm')
-rw-r--r--lib/Plack/Client/Backend/http.pm31
1 files changed, 31 insertions, 0 deletions
diff --git a/lib/Plack/Client/Backend/http.pm b/lib/Plack/Client/Backend/http.pm
index f57ee1f..e443385 100644
--- a/lib/Plack/Client/Backend/http.pm
+++ b/lib/Plack/Client/Backend/http.pm
@@ -1,9 +1,33 @@
package Plack::Client::Backend::http;
use strict;
use warnings;
+# ABSTRACT: backend for handling HTTP requests
use Plack::App::Proxy;
+=head1 SYNOPSIS
+
+ Plack::Client->new(
+ 'http' => {},
+ );
+
+ Plack::Client->new(
+ 'http' => Plack::Client::Backend::http->new,
+ );
+
+=head1 DESCRIPTION
+
+This backend implements HTTP requests. The current implementation uses
+L<Plack::App::Proxy> to make the request.
+
+=cut
+
+=method new
+
+Constructor. Takes no arguments.
+
+=cut
+
sub new {
my $class = shift;
my %params = @_;
@@ -15,6 +39,13 @@ sub new {
sub _proxy { shift->{proxy} }
+=method app_from_request
+
+Takes a L<Plack::Request> object, and returns an app which will retrieve the
+HTTP resource.
+
+=cut
+
sub app_from_request {
my $self = shift;
my ($req) = @_;