I have a form posting to endpoint /api/vendors/add. when I submit the form it gives me the error,
This page isn’t working If the problem continues, contact the site owner. HTTP ERROR 415
when I remove the param it works just fine. What am I doing wrong/missing. Everything I gooogled on param binding in min apis shows this as being a viable option.
<form method="post" action="/api/vendors/add">
<input type="text" name="vendor_name" placeholder="Vendor Name" size="45"/><br /><br />
<input type="text" name="vendor_id" placeholder="Vendor#" size="45"/><br /><br />
<input type="text" name="alpha_name" placeholder="Alpha" size="45" /><br /><br />
<input type="text" name="default_account" placeholder="Default Account"/><br /><br />
<input type="text" name="default_department" placeholder="Default Department" size="45"/><br /><br />
<input type="submit" />
</form>
app.MapPost("/api/vendors/add", ([FromBody] string jsonString) => {
return "/api/vendors/add/result";
});