-
-
Notifications
You must be signed in to change notification settings - Fork 8.5k
Closed
Labels
Description
Description
Hi,
I'm creating an API where authenticated users can trigger a processing chain. The chain requires an input which is provided by the user in the request body.
I'm wondering if there's a way to check if a request has been made through the doc interface via the "Try it out" feature. This way I could return a pre-defined response instead of triggering the chain (which will most likely end in an exception).
I could check the body for the default arguments I've defined and detect it this way. However, that seems a bit hacky, so I hope there's some functionality within FastAPI I could use for that purpose.