vs code에서 api 호출하기

twoStones·2022년 1월 14일
0

1. REST Client 설치

REST Client

2. requests.rest 파일 생성

아래 내용들을 호출할 api 에 맞게 바꾼 후
단축키 Ctrl+Alt+R(Cmd+Alt+R for macOS)

POST https://example.com/comments HTTP/1.1
content-type: application/json

{
    "name": "sample",
    "time": "Wed, 21 Oct 2015 18:27:50 GMT"
}


GET http://localhost:3000
Authorization: Bearer asdfsadf
content-type: application/json; charset=utf-8


POST http://localhost:3000
Authorization: Bearer asdfsadf
content-type: application/json; charset=utf-8

{
  "1": "",
}
profile
일단 작성

0개의 댓글