Ng Wai Foong
Nov 17, 2020

--

Yes, you just need to modify from @app.post to @app.get. In this tutorial, I am using POST because posting data to FastAPI server. If you just wanted to retrieve it, you can simply do it with GET and return FileResponse

For streaming, you should use streaming response instead. Have a look at the following code from official documentation

https://fastapi.tiangolo.com/advanced/custom-response/#streamingresponse

--

--

Ng Wai Foong
Ng Wai Foong

Written by Ng Wai Foong

Senior AI Engineer@Yoozoo | Content Writer #NLP #datascience #programming #machinelearning | Linkedin: https://www.linkedin.com/in/wai-foong-ng-694619185/

Responses (1)