☼
⌃
☰

Representational State Transfer

Table of Contents

Representational State Transfer

Overview

REST (Representational State Transfer) is an architectural style for designing networked applications. It emphasizes simplicity, scalability, and independence of components. RESTful systems use HTTP methods (GET, POST, PUT, DELETE) to manipulate resources identified by URIs.

Key Principles

  • Statelessness: Each request contains all necessary information, and the server doesn't maintain client-specific data between requests.
  • Client-server architecture: Separation of concerns between client and server.
  • Cacheable responses: Improve performance and reduce server load.
  • Uniform interface: Consistent use of HTTP methods and status codes.
  • Layered system: Support intermediaries like load balancers and proxies.
  • Code on demand (optional): Extend client functionality through downloaded code.

Common HTTP Methods

  • GET: Retrieve a representation of a resource.
  • POST: Create a new resource.
  • PUT: Update an existing resource.
  • DELETE: Remove a resource.