3 ms·
The application in the demo video left me with a few questions 1. Why does it use two requests with OPTIONS and POST methods instead of a single GET? Is this t
by vladdoster 1y ago
The application in the demo video left me with a few questions
1. Why does it use two requests with OPTIONS and POST methods instead of a single GET? Is this to reduce the amount/complexity of error handling logic in the generated application?
2. Why use a POST http request to get the sales data. I would have expected the route to use GET in this situation?
- ruben-davia 1y agoThe use of a single POST request (the underlying logic behind the @app.task decorator) is meant to simplify things, especially for users who aren’t familiar with FastAPI. It abstracts away routing and request handling so you can focus on writing business logic without worrying about HTTP methods, URL paths, or response formatting. That said, since Davia is built on top of FastAPI, you can absolutely define and use your own endpoints if you prefer.