"Fossies" - the Fresh Open Source Software Archive

Member "libwww-perl-6.43/xt/author/live/jigsaw/neg-get.t" (26 Nov 2019, 378 Bytes) of package /linux/www/libwww-perl-6.43.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 use strict;
    2 use warnings;
    3 use Test::More;
    4 use Test::RequiresInternet ('jigsaw.w3.org' => 80);
    5 
    6 use LWP::UserAgent;
    7 
    8 plan tests => 2;
    9 
   10 my $ua = LWP::UserAgent->new(keep_alive => 1);
   11 
   12 my $res = $ua->get(
   13     "http://jigsaw.w3.org/HTTP/neg",
   14     Connection => "close",
   15 );
   16 isa_ok($res, 'HTTP::Response', 'request: Got a proper response');
   17 is($res->code, 300, 'response code: 300');