Representational state transfer (REST) is a software architectural style that describes a uniform interface between physically separate components, often across the Internet in a client-server architecture. REST defines four interface constraints:
- Identification of resources
- Manipulation of resources
- Self-descriptive messages and
- Hypermedia as the engine of application state
Generally REST describes a machine to machine interface. In web development REST allows content to be rendered when it is requested, often referred to as Dynamic Content. RESTful Dynamic content uses server-side rendering to generate a web site and send the content to the requesting web browser, which interprets the server's code and renders the page in the user's web browser.
REST has been employed throughout the software industry and is widely accepted as a set of guidelines for creating stateless, reliable web APIs. A web API that obeys the REST constraints is informally described as RESTful. In general, RESTful web APIs are loosely based on HTTP methods such as GET and POST. HTTP requests are used to access data or resources in the web application via URL-encoded parameters. Responses are generally formatted as either JSON or XML to transmit the data.
"Web resources" were first defined on the World Wide Web as documents or files identified by their URLs. Today, the definition is much more generic and abstract and includes every thing, entity, or action connected to the Internet, local network or device. Every device on the Internet has a URI or Uniform Resource Identifier. In a RESTful Web service, requests made to a resource's URI elicit a response with a payload formatted in HTML, XML, JSON, or some other format. The most common protocol for these requests and responses is HTTP, which provides operations (HTTP methods) such as OPTIONS, GET, POST, PUT, PATCH and DELETE. By using a stateless protocol and standard operations, RESTful systems aim for fast performance, reliability, and the ability to grow by reusing components that can be managed and updated without affecting the system as a whole, even while it is running.
Oops something went wrong: