All kind API action method



HTTP verbs.

HTTP verbs specify an action to be performed on a specific resource or a
collection of resources.

There are quite a few REST verbs available, but five of them are used
frequently. Such as GET, POST, PUT, PATCH and DELETE.

GET: Fetches a record or set of resources from the server.
POST: Creates a new set of resources or a resource.
PUT: Updates or replaces the given record.
PATCH: Modifies the given record.

Web API Controller

We created Web API with MVC project in the previous section where it generated a simple controller.

Web API Controller is similar to ASP.NET MVC controller. It handles incoming HTTP requests and send response back to the caller.

Web API controller is a class which can be created under the Controllers folder or any other folder under your project's root folder. The name of a controller class must end with "Controller" and it must be derived from System.Web.Http.ApiController class. All the public methods of the controller are called action methods.


#Web #API #Restful #Service #RestAPI #core #API2

Post a Comment

Previous Post Next Post