#[http0_9_version]Expand description
Restricts function execution to HTTP/0.9 requests only.
This attribute macro ensures the decorated function only executes for HTTP/0.9 protocol requests, the earliest version of the HTTP protocol.
ยงUsage
use hyperlane::*;
use hyperlane_macros::*;
#[route("/http0_9_version")]
struct Http09;
impl ServerHook for Http09 {
async fn new(_ctx: &Context) -> Self {
Self
}
#[prologue_macros(http0_9_version, response_body("http0_9_version"))]
async fn handle(self, ctx: &Context) {}
}
impl Http09 {
#[http0_9_version]
async fn http0_9_version_with_ref_self(&self, ctx: &Context) {}
}
#[http0_9_version]
async fn standalone_http0_9_version_handler(ctx: &Context) {}The macro takes no parameters and should be applied directly to async functions
that accept a &Context parameter.