News for hackers. Stuff that matters.
Re:Show HN: Web Apps for Python Devs with Auto-Generated UI by vladdoster on Saturday May 24, 2025 @02:15AM (#44079118)
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?

Re:Show HN: Web Apps for Python Devs with Auto-Generated UI by ruben-davia on Saturday May 24, 2025 @06:52AM (#44080192)
The 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.