WEB API Test/Postman
Environment 생성 및 활용
정신차려이각박한세상속에서
2020. 8. 6. 15:29
What is Environment?
Env is a set of key-value pairs
선행 작업
아래 URL 참고하여 POST Requset 생성
Reqres - A hosted REST-API ready to respond to your AJAX requests
Native JavaScript If you've already got your own application entities, ie. "products", you can send them in the endpoint URL, like so: var xhr = new XMLHttpRequest(); xhr.open("GET", "https://reqres.in/api/products/3", true); xhr.onload = function(){ conso
reqres.in
Body 작업(아래 Json 형식의 데이터는 위의 페이지에서 확인)
{
"email": "{{email}}",
"password": "{{pasword}}"
}
Create Environment
MANAGE ENVIROMENTS > Add 클릭
Use Environment
변수 사용 예 : {{변수명}}
결과 콘솔 화면