tungstenite::handshake::server

Function create_response_with_body

Source
pub fn create_response_with_body<T1, T2>(
    request: &Request<T1>,
    generate_body: impl FnOnce() -> T2,
) -> Result<Response<T2>>
Expand description

Create a response for the request with a custom body.