#[delete]Expand description
A macro that creates route handler with worker::Router::delete
worker::Router::delete_async will be used if the handler is an async fn.
§Usage
#[delete("/path")]§Attributes
"path": Worker’s path.Option<cors>: Wrap a struct that implementsworker_route::MwService.Option<lazy_cors>: Wrap a lazy initialized Cors.Option<wrap>: Register an options handler with the provided cors. Defaults toNone.
§Examples
use worker::{Result, Request, RouteContext, Response};
use worker_route::delete;
#[delete("/path")]
async fn foo(req: Request, ctx: RouteContext<()>) -> Result<Response>{
Response::empty()
}