Esc

open_call

procedureextensionsince 0.36.1Source
  • macOS: open_call works on macOS
  • Linux: open_call works on Linux
  • Windows: open_call works on Windows
  • Wasm: open_call works on Wasm

Opens an RPC without retry or redirect. The channel and TLS configuration must remain alive until every call and close_channel have completed. .

Signature

open_call :: (
    channel: *Channel,
    method: Method,
    options := Call_Options.{}
) -> (Call, Status)
Example
channel: Channel; // set transport.base_url and transport.tls before the first call
method := Method.{ path = "/echo.Echo/Say" };
call, status := open_call(*channel, method);
assert(status.code == .OK);
defer close(*call);

See also