~/bend-docscommunity

src/transport/client.bend fails

raw source on the hub · import bendonnect-rpc@0.1.0.0/src/transport/client.bend as Client

Connect client transport (bend-kit-http). See src/README-api.md ("Transport -> Client").

Every call returns IO(Result<&1, &1, E.Error, Response>): - transport failures -> Fail(Unavailable, <error text>) - unary non-200 -> Fail(E.from_http(status, body)) - stream: error in the EndStreamResponse -> Fail(error) (messages before it are lost; use server_stream.each to see them as they arrive) - stream without EndStreamResponse -> Fail(Unknown "missing EndStreamResponse") Compressed messages are not supported (Fail Internal): no connect-accept-encoding is sent. The stream readers loop on Http.stream.read, which is @unsafe, so those loops are @unsafe too.

10 imports
import Base
import bend-kit-http@0.36.0.0/http.bend as Http
import bend-kit-bytes@0.3.2.0/bytes.bend as Bytes
import bend-kit-url@0.4.1.0/url.bend as Url
import ../code.bend as Code
import ../error.bend as E
import ../envelope.bend as Env
import ../protocol.bend as P
import ../metadata.bend as Md
import ../b64.bend as B64