mirror of
https://github.com/kennethreitz/responder.git
synced 2026-06-21 15:00:57 +00:00
2a28353e96
HTTP correctness: - Wrong method on an existing path returns 405 with an Allow header (previously a misleading 404) - OPTIONS requests are answered automatically with Allow - HEAD is accepted wherever GET is - set_cookie() gains a samesite parameter, defaulting to "lax" Ergonomics: - Handlers can return values: dict/list -> resp.media, str -> resp.text, bytes -> resp.content; returning None keeps mutate-resp behavior - The validated request_model instance is exposed as req.state.validated - RouteGroup.before_request hooks are scoped to the group's prefix (previously they silently applied globally) Dependency injection: - App-scoped dependencies via @api.dependency(scope="app") — resolved once on first use, cached for the app's lifetime, generator teardown at shutdown; app-scoped providers cannot take parameters - View signature inspection is cached per function Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
172 B
172 B
Backlog
Future Ideas
- OpenAPI 3.1 support
- Pluggable rate limiter backends (e.g. Redis) for multi-process deployments
- Dependency injection for WebSocket handlers