The Perl Weekly Challenge for week 9 includes an optional third challenge – essentially, use the Sparkpost service’s API to send an email. Sparkpost is a service that allows sending emails via an HTTP interface, just by posting a JSON form response.
I’ve noticed people have not known how to solve these API-usage challenges, so I will share my method of solving them, using Perl 6.