Created
September 5, 2021 14:11
-
-
Save jonathanstowe/7af59860823d65e83fd86c934b3e7412 to your computer and use it in GitHub Desktop.
Revisions
-
jonathanstowe created this gist
Sep 5, 2021 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,14 @@ use Cro::HTTP::Client; my $c; react { whenever Cro::HTTP::Client.get("http://cannibal.local") -> $v { whenever $v.body-text -> $m { $c = $m; done; } } } say $c; # vim: ft=raku This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,13 @@ use Cro::HTTP::Client; my $c = await (supply { whenever Cro::HTTP::Client.get("http://cannibal.local") -> $v { whenever $v.body-text -> $m { emit $m; done; } } }).Promise; say $c; # vim: ft=raku This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,6 @@ use Cro::HTTP::Client; my $c = await Cro::HTTP::Client.get("http://cannibal.local").then( { $_.result.body-text }).then({ $_.result.result }); say $c; # vim: ft=raku