Skip to main content

is_h2_websocket_connect

Function is_h2_websocket_connect 

Source
pub fn is_h2_websocket_connect(method: &Method, extensions: &Extensions) -> bool
Expand description

Returns true when this is an HTTP/2 RFC 8441 extended-CONNECT WebSocket request: :method == CONNECT and a :protocol extension of websocket.

hyper surfaces the :protocol pseudo-header as a [hyper::ext::Protocol] in the request extensions (behind the enabled http2 feature).