- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 27 for Middleware (0.22 sec)
-
docs/de/docs/reference/middleware.md
# Middleware Es gibt mehrere Middlewares, die direkt von Starlette bereitgestellt werden. Lesen Sie mehr darüber in der [FastAPI-Dokumentation über Middleware](../advanced/middleware.md). ::: fastapi.middleware.cors.CORSMiddleware Kann von `fastapi` importiert werden: ```python from fastapi.middleware.cors import CORSMiddleware ``` ::: fastapi.middleware.gzip.GZipMiddleware Kann von `fastapi` importiert werden: ```python
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Mar 30 18:15:39 GMT 2024 - 1001 bytes - Viewed (0) -
docs/en/docs/reference/middleware.md
# Middleware There are several middlewares available provided by Starlette directly. Read more about them in the [FastAPI docs for Middleware](https://fastapi.tiangolo.com/advanced/middleware/). ::: fastapi.middleware.cors.CORSMiddleware It can be imported from `fastapi`: ```python from fastapi.middleware.cors import CORSMiddleware ``` ::: fastapi.middleware.gzip.GZipMiddleware It can be imported from `fastapi`:
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 991 bytes - Viewed (0) -
docs/de/docs/advanced/middleware.md
# Fortgeschrittene Middleware Im Haupttutorial haben Sie gelesen, wie Sie Ihrer Anwendung [benutzerdefinierte Middleware](../tutorial/middleware.md){.internal-link target=_blank} hinzufügen können. Und dann auch, wie man [CORS mittels der `CORSMiddleware`](../tutorial/cors.md){.internal-link target=_blank} handhabt. In diesem Abschnitt werden wir sehen, wie man andere Middlewares verwendet. ## ASGI-Middleware hinzufügen
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Mar 30 20:18:15 GMT 2024 - 4.4K bytes - Viewed (0) -
docs/zh/docs/advanced/middleware.md
``` 但 FastAPI(实际上是 Starlette)提供了一种更简单的方式,能让内部中间件在处理服务器错误的同时,还能让自定义异常处理器正常运作。 为此,要使用 `app.add_middleware()` (与 CORS 中的示例一样)。 ```Python from fastapi import FastAPI from unicorn import UnicornMiddleware app = FastAPI() app.add_middleware(UnicornMiddleware, some_config="rainbow") ``` `app.add_middleware()` 的第一个参数是中间件的类,其它参数则是要传递给中间件的参数。 ## 集成中间件 **FastAPI** 为常见用例提供了一些中间件,下面介绍怎么使用这些中间件。
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Mar 30 22:44:27 GMT 2024 - 3.6K bytes - Viewed (0) -
tests/test_tutorial/test_sql_databases/test_sql_databases_middleware_py310.py
bebop <******@****.***> 1710356830 -0400
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Wed Mar 13 19:07:10 GMT 2024 - 16.5K bytes - Viewed (0) -
tests/test_tutorial/test_sql_databases/test_sql_databases_middleware.py
bebop <******@****.***> 1710356830 -0400
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Wed Mar 13 19:07:10 GMT 2024 - 16.3K bytes - Viewed (0) -
tests/test_tutorial/test_sql_databases/test_sql_databases_middleware_py39.py
bebop <******@****.***> 1710356830 -0400
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Wed Mar 13 19:07:10 GMT 2024 - 16.5K bytes - Viewed (0) -
docs/en/docs/how-to/custom-request-and-route.md
# Custom Request and APIRoute class In some cases, you may want to override the logic used by the `Request` and `APIRoute` classes. In particular, this may be a good alternative to logic in a middleware. For example, if you want to read or manipulate the request body before it is processed by your application. !!! danger This is an "advanced" feature. If you are just starting with **FastAPI** you might want to skip this section.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sun Mar 31 23:52:53 GMT 2024 - 4.4K bytes - Viewed (0) -
docs/zh/docs/advanced/custom-request-and-route.md
## 处理自定义请求体编码 下面学习如何使用自定义 `Request` 子类压缩 gizp 请求。 并在自定义请求的类中使用 `APIRoute` 子类。 ### 创建自定义 `GzipRequest` 类 !!! tip "提示" 本例只是为了说明 `GzipRequest` 类如何运作。如需 Gzip 支持,请使用 [`GzipMiddleware`](./middleware.md#gzipmiddleware){.internal-link target=_blank}。 首先,创建 `GzipRequest` 类,覆盖解压请求头中请求体的 `Request.body()` 方法。 请求头中没有 `gzip` 时,`GzipRequest` 不会解压请求体。 这样就可以让同一个路由类处理 gzip 压缩的请求或未压缩的请求。 ```Python hl_lines="8-15"
Plain Text - Registered: Sun Mar 31 07:19:09 GMT 2024 - Last Modified: Sat Mar 30 22:45:40 GMT 2024 - 3.8K bytes - Viewed (0) -
docs/en/docs/reference/fastapi.md
- get - put - post - delete - options - head - patch - trace - on_event - middleware
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 701 bytes - Viewed (0)