ASP.NET Core – Get posted form data in an API Controller

To get posted form data in an API Controller (using the [ApiController] attribute) in ASP.NET Core, use parameters with the [FromForm] attribute. Now send a request with form data to this endpoint to see it work. The request would look like this: The form data is a string of key-value pairs (ex: location=United+States). The framework … Read more