Stream: beginners

Topic: The Http module does not expose `get`:


view this post on Zulip Eelco Hoekema (Jun 23 2024 at 15:04):

I copied an example from basic-cli: which includes

{ foo } = Http.get! "http://localhost:8000" Json.utf8

The compiler complains however that Http does not expose get. It is in the documentation though. So what am i doing wrong?

view this post on Zulip Ian McLerran (Jun 23 2024 at 17:17):

Ah, that’s a change between basic cli v0.10.0 and v0.11.0. Basic-cli v0.11.0 is still prerelease though, so seems like the tutorial probably shouldn’t be including that yet.

You can go to GitHub and get the URL for v0.11.0 here, under the release assets: https://github.com/roc-lang/basic-cli/releases

view this post on Zulip Ian McLerran (Jun 23 2024 at 17:22):

You can read documentation for v0.10.0 and v0.11.0 here:

https://www.roc-lang.org/packages/basic-cli/0.10.0/
https://www.roc-lang.org/packages/basic-cli/0.11.0/

Another change to watch out for is in the File module, where many of the File.<ioFunction> now take a Str as a parameter instead of a Path object.

view this post on Zulip Eelco Hoekema (Jun 23 2024 at 19:54):

That helped. Thanks!


Last updated: Jul 06 2025 at 12:14 UTC