REST api 는 어디서부터 출발했는가?
- youtube 그런 REST API로 괜찮은가로 부터
WEB(1991)
Q: 어떻게 인터넷에서 정보를 공유할 것인가?
A: 정보들을 하이퍼테스트로 연결한다.
- 표현 형식 : HTML
- 식별자 : URL
- 전송 방법 : HTTP
HTTP/1.0 (1994-1996)
Q: Roy T. fielding: "How do i improve HTTP without breaking the web?"
A: HTTP Object Medel
REST(1998)
Roy T.Fielding,
Microsoft Research에서 발표
"Representational State Transfer"
REST(2000)
Roy T.Fielding, 박사 논문으로 발표
"Architectureal Styles and the Design of Network-based Software Architectures"
Waht is REST?
- Reresentational State Transfer -
Made by Roy Fielding
- Architecture stype for designing networked applications
- Relies on a stateless, client-server protocol, almost always HTTP
- Treats server objects as resources that can be created or destroyed
- Can be used by virtually any programming language
- REST API: REST 아키텍쳐 스타일을 따르는 api
- REST: 분산 하이퍼미디어 시스템(예: 웹)을 위한 아키텍쳐 스타일
- 아키테쳐 스타일: 제약조건의 집합
REST를 구성하는 스타일
- client-server
- stateless
- cache
- uniform insterface
- layered system
- code-on-demand (optional) : 서버에서 코드를 클라이언트로 보내서 실행할 수 있어야 한다. ( JavaScript)
- identifiecation of resources
- manipulation of resources through representations
- self-descriptive messages *
- hypermedia as the engine of application state (HATEOAS) *
HTTP Methods
- GET: Retrieve data from a specified resource
- POST: Submit data to be processed to a specified resource
- PUT: Update a specified resource
- DELETE: Delete a specified resource
- HEAD: Same as get but does not return a body
- OPTIONS: Returns the supported HTTP methods
- PATCH: Update partial resources
Postman