Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

23 lines (19 sloc) 0.709 kb
use v6;
use HTTP::Client;
use Test;
plan 6;
my $http =;
my $res = $http.get('');
#my $res = $http.get('');
#$*ERR.say: "~Status: "~$res.status;
#$*ERR.say: "~Message: "~$res.message;
#$*ERR.say: "~Proto: "~$res.protocol;
ok $res, "Constructed result object from direct get() call.";
ok $res.success, "Result was successful.";
my $content = $res.content;
#$*ERR.say: "~Content: $content";
#$*ERR.say: "~Headers: "~$res.headers.perl;
ok $content, "Content was returned.";
ok $content ~~ /Perl/, "Content was correct.";
ok $content ~~ /\<\/html\>/, "Got entire content";
ok $res.header('Content-Type') ~~ /^text\/html/, "Correct content type.";
Jump to Line
Something went wrong with that request. Please try again.