System.InvalidOperationException: This request does not have a Content-Type header. Forms are available from requests with bodies like POSTs and a form Content-Type of either application/x-www-form-urlencoded or multipart/form-data #55387
Labels
area-minimal
Includes minimal APIs, endpoint filters, parameter binding, request delegate generator etc
Milestone
Is there an existing issue for this?
Describe the bug
A minimal API post endpoint, that awaits form data generates 500 if the client sends a request to it with no form data
Expected Behavior
API should return 400?
Steps To Reproduce
https://github.com/BusHero/BugWithMinimalApi
Exceptions (if any)
.NET Version
8.0
Anything else?
The text was updated successfully, but these errors were encountered: