Intro: Web Api in MVC4

The Web Api (Application Programming Interface) feature is based on a special kind of controller to an MVC framework application.

An api controller distinguishes itself from the normal controllers by the following :-

  • Action methods return model, rather than an ActionResult in MVC, objects.
  • Action methods are selected based on the HTTP method used in the request.

The model objects that are returned from an API controller action method are encoded as JSON/XML based on the browsers used and sent to the client.

 

Advertisements
By Sriramjithendra Posted in WebAPI

Leave a Reply

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