Tuesday, August 2, 2016

ResponseType attribute in ASP.NET Web API

I was recently introduced to the ResponseType attribute for documenting my ASP.NET Web API Web Applications.  This was a feature that I was not aware of previously and after discovering it, found rather handy!

If you read the MSDN documentation for this attribute, you will see that it is used to describe the Web API for Web API Help: https://msdn.microsoft.com/en-us/library/system.web.http.description.responsetypeattribute(v=vs.118).aspx

This article addresses the ResponseType attribute as well as other Data Annotations much more clearly: http://www.strathweb.com/2014/01/return-types-action-parameters-and-data-annotations-now-available-in-web-api-2-1-help-page/

Therefore, you can use all of these attributes to more clearly your Web API Urls!

1 comment:

  1. There are some hosting companies out there who have great prices and the other features are just as good. Price may be one of the most important decisions of a web hosting plan, but there is much more to consider in choosing a quality web host. best hosting provider in bangladesh

    ReplyDelete