HTTP

Using LWP::Simple from the Raku ecosystem.

use LWP::Simple;

print LWP::Simple.get("http://www.rosettacode.org");

or, without LWP::Simple:

my $socket = IO::Socket::INET.new(host => "www.rosettacode.org",
				  port => 80,);
$socket.print("GET / HTTP/1.0\r\n\r\n");
print $socket.recv();
$socket.close;

Last updated