~/bend-docscommunity

wire.bend relies on unsafe/foreign

raw source on the hub · import 0x5e4e2a9db839a0214ace6923b04b685b/wire.bend as Wire

ezhttp/wire: one request out and one response back. TLS and DNS stay in the effect (OpenSSL via dlopen); this module does not re-specify TLS.

Spec: scheme, host, port each on their own line; everything after the third newline is the request verbatim. Answer: status on the first line, then text ("0" and the raw response, or a non-zero code and the reason).

1 import
import Base

Definitions

def wire.scheme source · line 15 · raw

@secure:Bool -> String

the word the effect reads for a scheme that wants TLS

def wire.spec source · line 23 · raw

@secure:Bool -> @host:String -> @port:U32 -> @req:String -> String

the spec the effect reads

def wire.talk source · line 27 · raw

@secure:Bool -> @host:String -> @port:U32 -> @req:String -> IO(String)

a request sent to a host and its whole answer read back

Effects (foreign code)

effect ezwire.talk source · line 10 · raw

@spec:String -> IO(String)

the exchange

foreign: effs/wire.c, effs/wire.js