Esc

Send_Options

structextensionsince 0.36.1Source
  • macOS: Send_Options works on macOS
  • Linux: Send_Options works on Linux
  • Windows: Send_Options works on Windows
  • Wasm: Send_Options works on Wasm

Declaration

Send_Options :: struct {
    compress := true;}

Per-message override: false uses an identity envelope on a negotiated gzip call.

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);
// The call negotiated gzip; send this one message uncompressed.
status = send_bytes(*call, u8.[1, 2, 3], .{ compress = false });
assert(status.code == .OK);

See also