top of page
Writer's pictureCodersarts AI

REST API | CodersArts




Rest acronym for Representation state transfer. It is architectural style for distributed hyper media systems and was first represented by fielding in 2000 in his famous,


Like any other architectural style REST it also have its own 6 guiding constrains which must be satisfied if an interface need to be referred as Restful,


Principles of rest :

  1. Client - Server

  2. stateless

  3. cacheable

  4. Uniform Interface

  5. Layered System

  6. code on demand

Rest and HTTP not same


A lot of people prefer to compare HTTP with REST. rest and http are not same.


REST != HTTP


Though, because REST also intends to make the web (internet) more streamline and standard, he advocates using REST principles more strictly. And that’s from where people try to start comparing REST with web (HTTP). Roy fielding, in his dissertation, nowhere mentioned any implementation directive – including any protocol preference and HTTP. Till the time, you are honoring the 6 guiding principles of REST, you can call your interface RESTful.

In simplest words, in the REST architectural style, data and functionality are considered resources and are accessed using Uniform Resource Identifiers (URIs). The resources are acted upon by using a set of simple, well-defined operations. The clients and servers exchange representations of resources by using a standardized interface and protocol – typically HTTP.

Resources are decoupled from their representation so that their content can be accessed in a variety of formats, such as HTML, XML, plain text, PDF, JPEG, JSON, and others. Metadata about the resource is available and used, for example, to control caching, detect transmission errors, negotiate the appropriate representation format, and perform authentication or access control. And most importantly, every interaction with a resource is stateless



Android assignment Related Help :

Contact us :

Email :contact@codersarts.com

8 views0 comments

Comments


bottom of page