You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tengtian
fb78a210ad
Automatically support HEAD method for all GET routes
RFC 7231 §4.3.2 states that the server SHOULD send the same header fields
in response to a HEAD request as it would have sent for GET. Starlette
does this by default but FastAPI's APIRoute did not.
This adds automatic HEAD support by overriding matches() and handle() on
APIRoute to accept HEAD requests when the route has GET in its methods.
Key design decisions:
- HEAD is NOT added to self.methods, so it stays out of the OpenAPI schema
- Explicit HEAD routes still work and appear in OpenAPI when declared
- The match promotion only happens when HEAD is not already in methods,
so explicit @app.head() or methods=["GET","HEAD"] are unaffected
- POST/PUT/DELETE/PATCH routes are not affected
Closes #1773
2 months ago
..
.agents/skills/ fastapi
📝 Update Skill, optimize context, trim and refactor into references (#15031)
3 months ago
_compat
👷 Add `ty` to precommit (#15091)
3 months ago
dependencies
👷 Add `ty` to precommit (#15091)
3 months ago
middleware
📝 Use `WSGIMiddleware` from `a2wsgi` instead of deprecated `fastapi.middleware.wsgi.WSGIMiddleware` (#14756)
4 months ago
openapi
👷 Add `ty` to precommit (#15091)
3 months ago
security
✏️ Fix typo for `client_secret` in OAuth2 form docstrings (#14946)
2 months ago
__init__.py
🔖 Release version 0.135.3
2 months ago
__main__.py
♻️ Add support for `pip install "fastapi[standard]"` with standard dependencies and `python -m fastapi` (#11935)
2 years ago
applications.py
✨ Add support for `@app.vibe()` (#15280)
2 months ago
background.py
🎨 Update internal types for Python 3.10 (#14898)
4 months ago
cli.py
👷 Add `ty` to precommit (#15091)
3 months ago
concurrency.py
♻️ Upgrade internal syntax to Python 3.9+ 🎉 (#14564)
6 months ago
datastructures.py
👷 Add `ty` to precommit (#15091)
3 months ago
encoders.py
👷 Add `ty` to precommit (#15091)
3 months ago
exception_handlers.py
⬆️ Upgrade Starlette supported version range to >=0.40.0,<0.49.0 (#14077)
9 months ago
exceptions.py
🎨 Update internal types for Python 3.10 (#14898)
4 months ago
logger.py
🔊 Refactor logging (#781)
7 years ago
param_functions.py
👷 Add `ty` to precommit (#15091)
3 months ago
params.py
👷 Add `ty` to precommit (#15091)
3 months ago
py.typed
✨ add py.typed to ship typing information (#209)
7 years ago
requests.py
⬆ Require Pydantic > 1.0 (#1862)
6 years ago
responses.py
✨ Add support for Server Sent Events (#15030)
3 months ago
routing.py
Automatically support HEAD method for all GET routes
2 months ago
sse.py
✨ Add support for Server Sent Events (#15030)
3 months ago
staticfiles.py
✨ Improve type annotations, add support for mypy --strict, internally and for external packages (#2547)
6 years ago
templating.py
✨ Improve type annotations, add support for mypy --strict, internally and for external packages (#2547)
6 years ago
testclient.py
✨ Improve type annotations, add support for mypy --strict, internally and for external packages (#2547)
6 years ago
types.py
🎨 Update internal types for Python 3.10 (#14898)
4 months ago
utils.py
🎨 Update internal types for Python 3.10 (#14898)
4 months ago
websockets.py
✨ Export `WebSocketState` in `fastapi.websockets` (#4376)
4 years ago