INNER CODE UNIT · Rust
fetch
cloudflare/workers-rs · templates/axum/src/lib.rs:10
async fn fetch(
req: HttpRequest,
_env: Env,
_ctx: Context,
) -> Result<axum::http::Response<axum::body::Body>> {
Ok(router().call(req).await?)
}
pub async fn root() -> &'static str {
"Hello Axum!"
}