[Doc][Serve] Update middleware docs for serve.client (#10819)

This commit is contained in:
Simon Mo
2020-09-22 11:03:32 -07:00
committed by GitHub
parent 864d1d2b59
commit 3c1a7c2954
+3 -3
View File
@@ -343,7 +343,7 @@ You can follow the same pattern for other Starlette middlewares.
from starlette.middleware import Middleware
from starlette.middleware.cors import CORSMiddleware
serve.init(
client = serve.start(
http_middlewares=[
Middleware(
CORSMiddleware, allow_origins=["*"], allow_methods=["*"])
@@ -390,10 +390,10 @@ you would with HTTP request. Here are some examples how ServeRequest mirrors Fla
- ``handle.remote(a="b")``
- ``request.args``
* - ``request.get(..., data="long string")``
- ``request.remote("long string")``
- ``handle.remote("long string")``
- ``request.data``
* - ``N/A``
- ``request.remote(python_object)``
- ``handle.remote(python_object)``
- ``request.data``
.. note::