REST

차노·2023년 8월 10일
0

Representational State Transfer.

  • resource: everything to manage by related software, such as text, picture, data, its software.

Information Transfer > At the time requested, to convey its state of resource.

  • It's normal to interact data through JSON or XML.
  • REST is a way to interact between client and server across the network.

It states the resource through HTTP URL and defines applying CRUD operation on its resource through HTTP Method.

It means that there is resource and be desigend to process its resource through HTTP Method.

CRUD OPeration

  • Create > POST
  • READ > GET
  • Update > PUT
  • DELETE > DELETE

Components

  1. Resource: URL
  • Unique ID exists on all resource. It exists on Server.
  • ID distinguished the resoure is HTTP URL such as '/groups/:group_id'.
  • Client point to the resource through URL and request manipluation on the state of the resource to server.

Server-Client Structure

  • Server has resource, and client call for it.
  • REST Server provides API and is responsible for storing and processing logic of business.

API

Applicationn Programming Interface: It enables interaction between computers stimulated by providing data and sum of function, and to share information each other.

  • collection : Resource called as directory to manage on server.

Action on resource is represented by HTTP Method.

'/' represents hierarchy.

RESTful

Web service to provide REST API.

Reference

API

An application Programming Interface (API) is a web service that grants access to specific data and methods that other applications can access and sometimes edit - via standart HTTP protocols, just like a website.

API는 다른 애플리케이션이 접근하고 때로는 편집할 수 있는 특정 데이터와 메소드에 접근 권한을 주는 웹서비스라 하며, 표준 HTTP 프로토콜을 통해 이루어진다. 웹사이트라 생각하면 된다.

Definition

REST stands for 'Representational State Transfer'. It is an architectural style and set of principles for designing networked applications and web services.

REST는 네트워크된 애플리케이션 웹 서비스를 디자인 하는데 필요한 아키텍쳐 스타일이자 일련의 원칙이다.

RESTful APIs adhere to a set of constraints and principles that promote a scalable, flexible, and stateless approach to communication.

HTTP Methods

  • GET: Retrieve data.
  • POST: Create new data.
  • PUT: Update existing data.
  • DELETE: Remove data.

0개의 댓글