modal.web_endpoint
Register a basic web endpoint with this application.
DEPRECATED: This decorator has been renamed to @modal.fastapi_endpoint.
This is the simple way to create a web endpoint on Modal. The function behaves as a FastAPI handler and should return a response object to the caller.
Endpoints created with @modal.web_endpoint are meant to be simple, single
request handlers and automatically have CORS enabled.
For more flexibility, use @modal.asgi_app.
To learn how to use Modal with popular web frameworks, see the guide on web endpoints.