gRPC vs. REST | IBM

Representational State Transfer, or REST, is a set of design principles (or architectural constraints): uniform interface, client-server decoupling, statelessness, cacheability, layered system architecture and code on demand (optional). APIs built using these principles are called REST APIs, or RESTful APIs.

REST APIs can use various programming languages and data formats, provided they conform to REST principles. It’s the most common way to construct an API.

REST APIs use HTTP requests (also known as HTTP methods) such as GET, POST, PUT and DELETE to perform standard database functions. These operations are used for creating, reading, updating and deleting resource records and are often referred to as “CRUD.” Server-side resources are identified by URLs called endpoints.

For example, a REST API would use a GET request to retrieve a record. A POST request creates a new record. A PUT request updates a record and a DELETE request deletes one. All HTTP methods can be used in API calls. A well-designed REST API is like a website running in a web browser with built-in HTTP functionality.

Resource information can be delivered to a client in many messaging formats including JavaScript Object Notation (JSON), HTML, XLT, Python, PHP or plain text. JSON is popular because it is both human and machine-readable and programming language agnostic.

Learn more about REST vs. GraphQL

Read more here: Source link