Http.request: def of cswap-bend-cli@0.1.0.0 Import: import cswap-bend-cli@0.1.0.0/http.bend as Http Lines 199-206 of cswap-bend-cli@0.1.0.0/http.bend: https://jend.leeeet.dev/read.txt?path=cswap-bend-cli@0.1.0.0/http.bend&start_line=199&end_line=206 import Base # One request through curl (config on stdin, so the token never reaches argv), # with the test seam applied. Fail carries the error kind: `timeout` or # `network`. def request(method: String, url: String, hs: List<(String & String)>, body: String, +timeout_s: U32) -> IO(Result<&2, &2, String, Reply>): IO.bind(String, Result<&2, &2, String, Reply>, test_base(), base => IO.bind(Result<&1, &1, U32 & String, U32 & (String & String)>, Result<&2, &2, String, Reply>, run(config(method, rewrite(base, url), hs, body, timeout_s), (timeout_s * 1000 + 3000 : U32)), r => IO.pure(Result<&2, &2, String, Reply>, reply(r)))) Uses (16): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO.bind https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO.pure https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Pair https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Result https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.add https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.mul https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/http.bend&name=Reply https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/http.bend&name=config https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/http.bend&name=reply https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/http.bend&name=rewrite https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/http.bend&name=run https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/http.bend&name=test_base