I\'m sending a request to server in the following form:
http://localhost:12345/api/controller/par1/par2
The request is correctly resolved t
I found for my use case this was much more useful, hopefully it helps someone else that spent time on this answer applying it
public IDictionary GetBodyPropsList()
{
var contentType = Request.Content.Headers.ContentType.MediaType;
var requestParams = Request.Content.ReadAsStringAsync().Result;
if (contentType == "application/json")
{
return Newtonsoft.Json.JsonConvert.DeserializeObject>(requestParams);
}
throw new HttpResponseException(HttpStatusCode.UnsupportedMediaType);
}