Response Type for Web API Actions that Return IHttpActionResult

Nice, exactly what I was looking for!

If your action produces HttpResponseMessage or IHttpActionResult instead, you can then use the new ResponseTypeAttribute to hint Web API about the return type.

via Return types, action parameters and data annotations now available in Web API 2.1 Help Page – StrathWeb StrathWeb.

Advertisements

Leave a comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s