Getting Started with REST API

Introduction:

For customer if we ask weather data is important for them or software is important. with out second thought customer will say data is my first priority. as data we should be update. software we can update.
        So here we will learn how data can be processed/analysed through the network by using REST(Representational State Transfer). Spring's REST will support build on Spring MVC.
        Now a days many of the applications are working on mobiles and also using rich front end script clients that consumes REST api running on server.
        Define REST(Representational State Transfer):

  • Representational --- REST resources can be represented in virtually any form like XML,JSON or HTML. it s depends on consumer of the resource.
  • State-- it represents the state of resource. you should be more careful on state of resource than action of resource.
  • Transfer-- REST can be transfer the resource date in some of the representations form(XML,JSON or HTML) in network/application to application.
There are actions in REST. these are defined by HTTP methods. actions are GET,POST,PUT/PATCH and DELETE.
  • Create-- POST
  • Read-- GET
  • Update-- PUT/PATCH
  • Delete-- DELETE.
These are common mappings to HTTP for CURD actions but its not a strict rule. PUT can be used to create new resource and POST can be used to update the resource.

More Topics:

Spring Security Basic Authentication Flow 

No comments:

Post a Comment