Every now and then someone asks whether Motoko canisters can use certified variables, or whether they can serve HTTP requests with certification, and I always responded that yes, Motoko can do that, all that’s missing are a few libraries. But I figured I should put my hand where my mouth is, and actually demonstrate that it’s possible.
So here we go. If you go to https://ce7vw-haaaa-aaaai-aanva-cai.ic0.app/ you will see that
- the URL has no
raw
in it, so it is certified, - that the response is actually dynamic; you can leave a message at the bottom of https://ic.rocks/principal/ce7vw-haaaa-aaaai-aanva-cai and see it show up
- this claims it’s written in Motoko.
To prove the latter claim, here is the commented code; you can also browse the full repository.