Add camel-case functions for websocket request

This commit is contained in:
Ali Mirghasemi 2026-02-23 09:19:13 +03:30
parent 96a4964c1b
commit 22ecbad4ba
1 changed files with 13 additions and 0 deletions

View File

@ -245,6 +245,19 @@ impl WebsocketsRequest {
self.header(AUTHORIZATION, format!("Bearer {}", token)) 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. /// Complete request construction and connect to a WebSocket server.
pub async fn connect( pub async fn connect(
mut self, mut self,