JSON Server × CRUD
과정
1. 설치
2. public 폴더 생성
3. postman 파라미터 사용해보기
4. postman CRUD 사용해 보기
파라미터 사용 방법
Filter
Use . to access deep properties (하위 속성을 선택 할 때는 .을 사용해라)
GET /posts?title=json-server&author=typicode
GET /posts?id=1&id=2
GET /comments?author.name=typicodeSort (정렬)
Add _sort and _order (ascending order by default)
GET /posts?_sort=views&_order=asc
GET /posts/1/comments?_sort=votes&_order=ascFor multiple fields, use the following format:
GET /posts?_sort=user,views&_order=desc,asc Slice (특정 데이터만 추출)
Add _start and _end or _limit (an X-Total-Count header is included in the response)
GET /posts?_start=20&_end=30
GET /posts/1/comments?_start=20&_end=30
GET /posts/1/comments?_start=20&_limit=10Works exactly as Array.slice (i.e. _start is inclusive and _end exclusive)
Full-text search (검색)
Add q
GET /posts?q=internet참고
Last updated
Was this helpful?