Skip to content

Instantly share code, notes, and snippets.

@leedo
Created December 13, 2009 03:46
Show Gist options
  • Save leedo/255252 to your computer and use it in GitHub Desktop.
Save leedo/255252 to your computer and use it in GitHub Desktop.
test_psgi
app => Plack::App::Proxy->new(host => sub {
my $env = shift;
($env->{PATH_INFO} =~ /^\/(.+)/);
}),
client => sub {
my $cb = shift;
my $req = HTTP::Request->new(GET => "http://localhost/http://www.google.com");
my $res = $cb->($req);
like $res->content, qr/Google Search/, "google";
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment