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. A request to this endpoint would look like this: The form data is a string of key-value pairs (ex: location=United+States). The framework tries to map the form data to parameters by matching the … Read more