-
-
Save ugexe/b13730923b257f37e224a4eabb1e2db6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use v6; | |
use Net::HTTP::GET; | |
my Str @urls = "https://www.google.com", | |
"https://www.yahoo.com", | |
"https://www.microsoft.com"; | |
await Promise.allof: @urls.map: { | |
sleep $++; | |
start { | |
say "---> Making requst to $_"; | |
my $res = Net::HTTP::GET($_); | |
say "<--- Got response from $_ with status code: {$res.status-code}"; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment