<h3 dir="auto">First check</h3>
<ul dir="auto">
<li>[YES ] I used the GitHub search to find a similar issue and didn't find it.</li>
<li>[ YES] I searched the FastAPI documentation, with the integrated search.</li>
<li>[ YES] I already searched in Google "How to X in FastAPI" and didn't find any information.</li>
</ul>
<h3 dir="auto">Description</h3>
<p dir="auto">How can I add multiple request body for same endpoint. I wanted to accept application/json and application/pdf for same endpoint. Lets say i have exposed <a href="http://localhost:5000/test" rel="nofollow">http://localhost:5000/test</a> which should accept application/json as well as application/pdf. I wanted to write business logic based on request body type.?</p>
<p dir="auto">Is it possible to expose only one endpoint with multiple request body type like application/json and application/pdf?</p>
<h3 dir="auto">Additional context</h3>
<p dir="auto">OpenAPI allows describing multiple accepted content-types for a request.<br>
Is it possible via FastAPI means?</p>
<p dir="auto">I'd like to make a password login endpoint accepting both <code class="notranslate">application/json</code> and <code class="notranslate">application/x-www-form-urlencoded</code> using a single handler.</p>