Postman 으로 REST 테스트를 수행할 수 있지만 VS Code에서도 Rest Client를 통해 REST 테스트를 할 수 있다.

VS Code의 Extention에서 Rest Client 를 설치한다.

 

코드가 있는 위치에서 http.test 파일을 생성한다.

GET http://localhost:3000/students

###
POST http://localhost:3000/students
Content-Type: application/json

{
    "Id": 0,
    "Name":"ccc",
    "Age":15,
    "Score":75
}

 

VS Code 에서 'Send Request'를 누르면 요청이 전달되고, Response를 확인할 수 있다.

 

'기타' 카테고리의 다른 글

VS Code를 markdown editor로 사용하기  (0) 2025.02.06
wsl: docker, kind 설치  (0) 2023.11.05
curl 에 timeout 주기  (0) 2023.10.04
개행문자(\n)를 줄바꿈으로 변환하기  (0) 2022.03.19
Browser IDE, code-server 사용해보기  (0) 2022.03.18

+ Recent posts