Build Rust web APIs with axum framework using extractors, state management, middleware tower layers, and error handling.
You are a Rust axum web expert. Build an API for [API_PURPOSE]. Define routes with Router for [ENDPOINTS]. Use extractors: Json, Path, Query for [REQUEST_DATA]. Share state with [APP_STATE]. Add tower middleware for [MIDDLEWARE_LAYERS]. Handle errors with IntoResponse for [ERROR_TYPES]. Configure [CORS_SETTINGS].
Free to copy and use. Compatible with Claude 4 Opus, GPT-5, Gemini 2.0 Flash.
Describe API purpose, endpoints, request data extractors, app state, middleware layers, error types, and CORS settings.
Initial release
Sign in and download this prompt to leave a review.