You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
HTTP 메서드 활용
클라이언트에서 서버로 데이터 전송
데이터 전달 방식은 2가지
4가지 상황
정적 데이터 조회
동적 데이터 조회
HTML Form을 통한 데이터 전송
HTTP API 설계 예시
회원 관리 시스템
API 설계 : POST 기반 등록
POST : 신규 자원 등록 특징
클라이언트는 등록될 리소스의 URI를 모른다.
서버가 새로 등록된 리소스 URI를 생성해준다.
컬렉션(Collection)
API 설계 : PUT 기반 등록
PUT : 신규 자원 등록 특징
클라이언트가 리소스 URI를 알고 있어야 한다.
- 파일 등록 /files/{filename} : PUT
- PUT : /files/star.jpg
클라이언트가 직접 리소스의 URI를 지정한다.
스토어(Store)
- 클라이언트가 관리하는 리소스 저장소
- 클라이언트가 리소스의 URI를 알고 관리
- 여기서 스토어는 /files
HTML FORM 사용
정리
참고하면 좋은 URI 설계 개념
문서(document)
컬렉션(collection)
스토어(store)
컨트롤러(controller), 컨트롤 URI
출처
All reactions