REST API
REST API is an architectural style for an application program interface (API) that uses HTTP requests to access and use data. A request is sent from client to server in the form of a web URL as HTTP GET or POST or PUT or DELETE request. GET: The HTTP GET method is used to read (or retrieve) a representation of a resource. Example GET: Request for all Students. HTTP GET:/api/students POST: The POST verb is most often utilized to create new resources. Example POST: Request for Posting/Creating/Inserting Data HTTP POST:/api/students {“name”:”Aditya”} PUT: It is used for updating the capabilities. However, PUT can also be used to create a resource in the case where the resource ID is chosen by the client instead of by the server. PATCH: It is used to modify capabilities. The PATCH request only needs to contain the changes to the resource, not the complete resource. Example PUT or PATCH: Request for Updating Data at id=1 HTTP PUT or PATCH:/api/students/1 {“name”:”Rahul”}