REST(Representational State Transfer)는 효율적이고 안정적이며 확장 가능한 분산 시스템을 구현하는 소프트웨어 아키텍처 설계이다. 즉, REST는 HTTP를 잘 활용하기 위해 만들어진 아키텍처이자 원칙이라고 볼 수 있다.
- http://api.example.com:8080/{Collection}
Collection
은 일반적으로 객체들의 집합이기 때문에 복수명사(-s,-es)를 사용한다.GET
, POST
, PATCH
, DELETE
)를 사용한다.예약 생성
- http://api.example.com:8080/reserves/create (X)
- [ POST ] http://api.example.com:8080/reserves (O)
예약 취소
- http://api.example.com:8080/reserves/delete (X)
- [DELETE] http://api.example.com:8080/reserves (O)