#[clear_response_headers]Expand description
Clears all response headers.
This attribute macro clears all response headers from the response.
ยงUsage
use hyperlane::*;
use hyperlane_macros::*;
#[route("/clear_response_headers")]
struct ClearResponseHeaders;
impl ServerHook for ClearResponseHeaders {
async fn new(_ctx: &mut Context) -> Self {
Self
}
#[prologue_macros(
clear_response_headers,
filter(ctx.get_request().get_method().is_unknown()),
response_body("clear_response_headers")
)]
async fn handle(self, ctx: &mut Context) {}
}
impl ClearResponseHeaders {
#[clear_response_headers]
async fn clear_response_headers_with_ref_self(&self, ctx: &mut Context) {}
}
#[clear_response_headers]
async fn standalone_clear_response_headers_handler(ctx: &mut Context) {}The macro should be applied to async functions that accept a &mut Context parameter.