Home  >  Article  >  What is restful api?

What is restful api?

little bottle
little bottleOriginal
2019-05-11 14:18:2423107browse

RESTful API is a REST-style API, which is a set of protocols used to standardize the interaction between multiple forms of front-ends and the same backend. The RESTful API is called by the front-end provided by the back-end, that is, SERVER; the front-end calls the API to initiate an HTTP request to the back-end, and the back-end responds to the request and feeds back the processing results to the front-end.

What is restful api?

If you want to know what RESTful api is, you must first know what REST is.

REST (English: REpresentational State Transfer, abbreviated as REST) ​​describes an architectural style network system, which refers to a set of architectural constraints and principles. However, an application or design that satisfies these constraints and principles is RESTful.

The literal translation of REST in English is "presentation layer state transfer". If you look at this concept, it is estimated that not many people will understand what it means. Let me explain what RESTful is in human words: URL locates resources and uses HTTP verbs (GET, POST, PUT, DELETE) to describe operations.

Resource: Resource, that is, data.

Representational: Some form of representation, such as JSON, XML, JPEG, etc.;

State Transfer: State change. Implemented via HTTP verbs.

So RESTful API is a REST style API.

So in what scenarios is RESTful API used?

There are many front-end display media in today’s Internet applications. There are mobile phones, tablets, PCs and other display media. Then it is definitely the most scientific and economical way to process the user requests received by these front-ends in a unified backend and return them to different front-ends. RESTful API is a set of protocols to standardize the interaction between multiple forms of front-end and the same back-end. The RESTful API is called by the backend, that is, the SERVER, which provides the frontend. The front end calls the API to initiate an HTTP request to the backend, and the backend responds to the request and feeds back the processing results to the front end.

The above is the detailed content of What is restful api?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:What is restful?Next article:What is restful?