I have a controller method:
[HttpPost]
public HttpResponseMessage SetKitten([FromBody] string kittenName)
{
return Request.CreateResponse(HttpStatusCode.OK);
}
In Swagger it appears as a POST but when I try it, swagger sends the request using query parameters:
Request URL
localhost.../KittenHandler/SetKitten?kittenName=Boris
This results in an error as it must be in the body.
Any idea why swagger is doing this?