Tuesday, July 12, 2016

Custom media content type in MVC Web Api 2

The MVC Web Api is quite powerfull in that it enables us to develop REST web services, however one key factor of REST design principles is  hypermedia as the engine of application state.

To achieve this, a custom media formatter class must be defined in MVC web api 2 project and then add and object of this class to GlobalConfiguration.Configuration.Formatters collection.

An in depth article can be found at

http://www.tugberkugurlu.com/archive/creating-custom-csvmediatypeformatter-in-asp-net-web-api-for-comma-separated-values-csv-format


No comments:

c# httpclient The remote certificate is invalid according to the validation procedure: RemoteCertificateNameMismatch

 If we get this error while trying to get http reponse using HttpClient object, it could mean that certificate validation fails for the remo...