API..
-> Application Programming Interface
-> 통신 규약
-> 웹서버와 클라이언트 간의 요청 방식(방법)
-> ex) app.get('/', function() {});
Rest API는
-> 잘 짜여진 API(일관성있는)
-> HTTP요청 시스템(GET, POST, PUT, DELETE)
6가지 원칙
1. Uniform interface
2. Client-Server 역할구분
3. Stateless
4. Cacheable
5. Layered System
6. Code on Demand
1번이 가장 중요함(예측가능, 간결, 형식이 일관적)
ex) www.example.com/product/66432
instagram.com/explore/tags/kpop
등등..(API작성은 명사로작성한다.)
띄어쓰기는 '-'사용, 자료 하나당 하나의 URL