def fetch

ezx@1.11.0.0 · src/hub/get.bend:55

import ezx@1.11.0.0/src/hub/get.bend as Get
import Base
import snap@1.4.0.0/main.bend as R
import ezx@1.11.0.0/src/hub/hub.bend as Hub

55# the file at a url, accepted only when it hashes to `want`
56def fetch(+url: String, want: String) -> IO(Hub.Got):
57  do IO<Hub.Got>:
58    +out : String <- get(url)
59    return Hub.judge(R.ok(out), Hub.matches(want, R.text(out)), url, R.text(out))

Uses (10)

Used by (4)