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