Esc

open_http2_exchange

procedureextensionexperimentalsince 0.36.1Source
  • macOS: open_http2_exchange works on macOS
  • Linux: open_http2_exchange works on Linux
  • Windows: open_http2_exchange works on Windows
  • Wasm: open_http2_exchange works on Wasm

Opens a TLS HTTP/2 stream, without replay, redirects or HTTP/1 fallback. Returns after request headers are queued, so upload and response reads are independent. Call inside Io.io_run. The channel's address is its connection-pool identity.

Signature

open_http2_exchange :: (
    channel: *Http2_Channel,
    path: string,
    headers: [] Header_Field
) -> (Http2_Exchange, Client_Error)
Example
exchange, error := open_http2_exchange(*channel, "/example.Service/Method", headers);
defer close_exchange(*exchange);

See also