[Serve] Unwrap Flask Request from ServeHandle (#10845)

This commit is contained in:
Simon Mo
2020-09-22 12:44:23 -07:00
committed by GitHub
parent 970fc37173
commit 7fbe076813
3 changed files with 42 additions and 1 deletions
+11
View File
@@ -411,3 +411,14 @@ you would with HTTP request. Here are some examples how ServeRequest mirrors Fla
print("Request coming from web!")
elif isinstance(request, ServeRequest):
print("Request coming from Python!")
.. note::
Once special case is when you pass a web request to a handle.
.. code-block:: python
handle.remote(flask_request)
In this case, Serve will `not` wrap it in ServeRequest. You can directly
process the request as a ``flask.Request``.