페이크 REST API 서버 JSONPlaceholder

Jmnote (토론 | 기여)님의 2021년 12월 27일 (월) 23:16 판 (→‎개요)

1 개요

JSONPlaceholder
  • 페이크 REST API 서버
fetch('https://jsonplaceholder.typicode.com/posts/1')
  .then((response) => response.json())
  .then((json) => console.log(json));

2 예시

동작 메소드 경로 예시URL
글목록 조회 GET /posts http://jsonplaceholder.typicode.com/posts
1번 글 조회 GET /posts/1 http://jsonplaceholder.typicode.com/posts/1
1번 글의 댓글목록 조회 GET /posts/1/comments http://jsonplaceholder.typicode.com/posts/1/comments
새글 입력 POST /posts http://jsonplaceholder.typicode.com/posts
1번 글 수정 PUT /posts/1 http://jsonplaceholder.typicode.com/posts/1
1번 글 수정 PATCH /posts/1 http://jsonplaceholder.typicode.com/posts/1
1번 글 삭제 DELETE /posts/1 http://jsonplaceholder.typicode.com/posts/1

3 같이 보기

4 참고

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}