def fill

ezmcp@0.1.0.0 · src/openapi.bend:1137

import ezmcp@0.1.0.0/src/openapi.bend as Openapi
import Base
import emerging-ezjson@1.2.0.0/src/value.bend as Value
import emerging-ezhttp@0.21.0.0/src/pct.bend as Pct

1137# a path template with its first `{name}` replaced by the value's text,
1138# percent-encoded as a path segment
1139def fill(path: String, +name: String, val: Value.Json) -> String:
1140  swap(path, "{" ++ name ++ "}", Pct.quote(False{}, plain(val)))

Uses (7)

Used by (1)