1. Http Method
Method
|
설명
|
POST
|
생성 insert
|
GET
|
조회 select
|
PUT
|
생성 or 수정 update
|
PATCH
|
수정 update
|
DELETE
|
삭제 delete
|
2. URI
1. 하이푼(-)은 사용
2. 언더바(_)는 사용하지 않는다.
3. 대문자는 사용하지 않는다.
4. 파일 확장자를 노출시키지 않는다.
5. 동일한 URI에 행위에 맞게 메서드를 사용한다.
http://example.com/api/test/kht 라는 url 에서
- [GET요청] http://example.com/api/test/kht 는 리스트를
- [POST요청] http://example.com/api/test/kht 는 등록을
- [DELETE요청] http://example.com/api/test/kht 는 삭제를
- [PATCH요청] http://example.com/api/test/kht 는 업데이트를 수행하게끔
반응형
'Etc' 카테고리의 다른 글
WebRTC (0) | 2024.07.30 |
---|---|
CQRS (Command and Query Responsibility Segregation) (0) | 2024.02.26 |
Window Fpp 인증 해제 및 신규 인증 (0) | 2023.04.05 |
Maven Phase & Scope & Copy Dependencies (0) | 2023.02.09 |
Git (0) | 2023.01.20 |