mirror of
https://github.com/wassname/ray.git
synced 2026-07-23 13:10:11 +08:00
[Doc][Serve] Update middleware docs for serve.client (#10819)
This commit is contained in:
@@ -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::
|
||||
|
||||
Reference in New Issue
Block a user