Course of Raku / Functional, concurrent, reactive, and web programming / Web programming / Cro 101 / Exercises
Status with a client
Problem
Fetch a web page’s status the easy way — with the Cro client
module instead of a raw socket. Use
Cro::HTTP::Client.get to fetch
http://example.com/, await the response, and
print its .status — no text parsing needed.
This exercise needs the Cro module installed (
zef install cro) and a working network connection.
Example
When run, the program prints:
200Solution
Course navigation
← Solution: A second route | Solution: Status with a client →