From 22ecbad4ba7968b70ddabb55de91d9d6fcc30311 Mon Sep 17 00:00:00 2001 From: Ali Mirghasemi Date: Mon, 23 Feb 2026 09:19:13 +0330 Subject: [PATCH] Add camel-case functions for websocket request --- awc/src/ws.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/awc/src/ws.rs b/awc/src/ws.rs index c33531d41..6d4c28c9a 100644 --- a/awc/src/ws.rs +++ b/awc/src/ws.rs @@ -245,6 +245,19 @@ impl WebsocketsRequest { self.header(AUTHORIZATION, format!("Bearer {}", token)) } + /// Is to uppercase headers with Camel-Case. + /// Default is `false` + #[inline] + pub fn camel_case_headers(&self) -> bool { + self.head.camel_case_headers() + } + + /// Set `true` to send headers which are formatted as Camel-Case. + #[inline] + pub fn set_camel_case_headers(&mut self, val: bool) { + self.head.set_camel_case_headers(val) + } + /// Complete request construction and connect to a WebSocket server. pub async fn connect( mut self,