- 전체
- HTML
- Web Design (웹디자인)
- XE 응용 개발
- wordpress plugin dev
- Javascript & JavaScript Application
- MEAN Stack : full stack javascript
- angular js & ionic framework
- bootstrap
- WebGL, Three.js and Babylon.js
- restful api design
- mobile web
- node.js 응용
- Cloud Service 응용
- 웹 어셈블리 개발 [WASM, WebAssembly]
- 마이크로서비스, MSA (microservice architecture)
- WebGL / WebGPU
- next.js 개발
- micro frontend (마이크로프론트앤드)
- 전자상거래/쇼핑몰
- 서버 클라우드 (aws, azure, google)
REST API URL 규칙, RESTful한 URL이란?

REST API 설계시 가장 중요한 항목은 아래 두가지이다.
1️⃣ URI는 정보의 자원을 표현해야 한다는 점
2️⃣ 자원에 대한 행위는 HTTP Method(GET, POST, PUT, DELETE)로 표현한다는 점
두 가지를 기억하며, 좀 더 RESTful한 URL을 설계해보자!(REST API에 대해 더 알아보려면? ???? 클릭 )
1. 소문자를 사용한다.
주소에서 대소문자를 구분하므로, 카멜방식이 아닌 소문자를 사용하여 작성한다.
Bad
http://restapi.example.com/users/postComments
Good
http://restapi.example.com/users/post-comments
2. 언더바를 대신 하이픈을 사용한다.
가급적 하이픈의 사용도 최소화하며, 정확한 의미나 표현을 위해 단어의 결합이 불가피한 경우에 사용한다.
Bad
http://restapi.example.com/users/post_comments
Good
http://restapi.example.com/users/post-comments
3. 마지막에 슬래시를 포함하지 않는다.
슬래시는 계층을 구분하는 것으로, 마지막에는 사용하지 않는다.
Bad
http://restapi.example.com/users/
Good
http://restapi.example.com/users
4. 행위는 포함하지 않는다.
행위는 URL대신 Method를 사용하여 전달한다.(GET, POST, PUT, DELETE 등)
Bad
POST http://restapi.example.com/users/1/delete-post/1
Good
DELETE http://restapi.example.com/users/1/posts/1
5.파일 확장자는 URI에 포함시키지 않는다.
REST API에서는 메시지 바디 내용의 포맷을 나타내기 위한 파일 확장자를 URI 안에 포함시키지 않습니다. Accept header를 사용하도록 한다.
Bad
http://restapi.example.com/users/photo.jpg
Good
GET http://restapi.example.com/users/photo
HTTP/1.1 Host: restapi.example.com Accept: image/jpg
6. 가급적 전달하고자하는 자원의 명사를 사용하되, 컨트롤 자원을 의미하는 경우 예외적으로 동사를 허용한다.
Bad
http://restapi.example.com/posts/duplicating
Good
http://restapi.example.com/posts/duplicate
출처: https://devuna.tistory.com/79 [튜나 개발일기????]
광고 클릭에서 발생하는 수익금은 모두 웹사이트 서버의 유지 및 관리, 그리고 기술 콘텐츠 향상을 위해 쓰여집니다.
댓글 0
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 수 |
|---|---|---|---|---|
| 4 |
[Node.js] forever - node.js app 이 죽을경우 자동으로 재실행해주는 모듈
| 졸리운_곰 | 2017.09.26 | 635 |
| 3 |
[Node.js] proxy 환경에서 node.js 설정
| 졸리운_곰 | 2017.08.16 | 485 |
| 2 |
[Node.js] Node.js, Express, MongoDB를 이용하여 REST API 만들기
| 졸리운_곰 | 2016.06.06 | 771 |
| 1 |
Create a Web App and RESTful API Server Using the MEAN Stack
| 졸리운_곰 | 2016.06.05 | 2119 |

