Closed kadevu closed 6 years ago
Hi there!
We use the same formatters that Web API defines natively which means that we handle the same media types as Web API does. By default, Web API registers 'application/json' and 'text'json' but you can add your own media types by adding this to the WebApiConfig.Register method:
config.Formatters.JsonFormatter.SupportedMediaTypes.Add("application/vnd.api+json");
Hope this helps!
Henrik
Closing as question has been answered.
I am using GenericJsonWebHook and it throws an exception
The WebHook request contained invalid JSON: 'No MediaTypeFormatter is available to read an object of type 'JToken' from content with media type 'application/vnd.api+json'.'
But when I change the Content-Type to application/json, it works just fine.