REST & HTTP
REST, or Representational State Transfer, is a way to create internet-based services, known as web services, web APIs, REST APIs, or RESTful APIs. Those services commonly use HTTP as their transport protocol. REST reuses well-known HTTP specifications instead of recreating new ways of exchanging data. For example, returning an HTTP status code 200 OK
indicates success, while 400 Bad Request
indicates failure.Here are some defining characteristics:
- Statelessness: In a RESTful system, every client-to-server request should contain all the details necessary for the server to comprehend and execute it. The server retains no information about the client's most recent HTTP request. This enhances both reliability and scalability.
- Caching capabilities: Clients should be able to cache responses to enhance performance.
- Simplicity and lose coupling: REST uses HTTP to ensure a simplified, decoupled architecture. This makes the development, maintenance, and scaling of REST APIs...