diff --git a/cli/ops/websocket.rs b/cli/ops/websocket.rs index 77b2b5f11d..c8fb895431 100644 --- a/cli/ops/websocket.rs +++ b/cli/ops/websocket.rs @@ -99,6 +99,9 @@ pub async fn op_ws_create( let uri: Uri = args.url.parse()?; let mut request = Request::builder().method(Method::GET).uri(&uri); + request = + request.header("User-Agent", format!("Deno/{}", crate::version::DENO)); + if !args.protocols.is_empty() { request = request.header("Sec-WebSocket-Protocol", args.protocols); }