HTTP-AnyUA
view release on metacpan or search on metacpan
t/23-content-coderef.t view on Meta::CPAN
plan tests => scalar user_agents;
test_all_user_agents {
plan tests => 10;
my $ua = shift;
my $any_ua = HTTP::AnyUA->new(ua => $ua, response_is_future => 1);
if ($ua->isa('Mojo::UserAgent')) {
# disable keep-alive to avoid Mojo::Reactor::EV warnings
$ua->max_connections(0);
}
my $chunk = 0;
my @chunk = ('some ', 'document');
my $code = sub { return $chunk[$chunk++] };
my $path = '/create-document';
my $url = $server->url . $path;
my $future = $any_ua->post($url, {
( run in 1.656 second using v1.01-cache-2.11-cpan-71847e10f99 )