3.1.24 fetch
Usage:
include fetch
import fetch as ...
Fetches the content at the given url with HTTP GET, expecting that the result is text/plain. If any errors occur, returns right with that error. If no errors occur, returns left with the returned string body.
Examples:
include fetch check: animals-data = fetch("https://raw.githubusercontent.com/brownplt/pyret-lang/refs/heads/horizon/tests/io-tests/tests/animals-ds-2024.csv") spy: animals-data end string-contains(animals-data.v, "Name,Species,Sex,Age (years)") is true end