Skip to main content

websocket_url

Function websocket_url 

Source
pub fn websocket_url(base_url: &str, path: &str) -> Result<String>
Available on crate feature websocket only.
Expand description

Appends path to a base URL, converting HTTP(S) to WS(S) and retaining existing WS(S) schemes, query, and fragment. Trims boundary slashes from the appended path. Returns an error for invalid URLs or unsupported schemes.