Notice
Recent Posts
Recent Comments
Link
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | 7 |
| 8 | 9 | 10 | 11 | 12 | 13 | 14 |
| 15 | 16 | 17 | 18 | 19 | 20 | 21 |
| 22 | 23 | 24 | 25 | 26 | 27 | 28 |
| 29 | 30 | 31 |
Tags
- 동영상
- node.js
- 테스트 자동화
- android13
- 인앱결제
- SwiftUI Tutorial
- rx
- mvvm
- PagingLib
- Koin
- SWIFTUI
- Reactive
- php
- Android
- list
- node
- MediaPlayer
- google play
- MotionLayout
- paging
- GCP
- RxKotlin
- Animation
- databinding
- MediaSession
- Kotlin
- junit
- Android 13
- Observable
- mysql
Archives
- Today
- Total
봄날은 갔다. 이제 그 정신으로 공부하자
[POSTMAN] Pre-request 스크립트를 사용해 API 호출 전처리 작업하기 본문
pm.sendRequest({
url: "https://" + pm.collectionVariables.get("host") + pm.collectionVariables.get("loginUrl"),
method: 'POST',
header: {
'Accept': 'application/json',
'Content-Type': 'application/x-www-form-urlencoded',
},
body: {
mode: 'urlencoded',
urlencoded: [
{
key: "id",
value: pm.collectionVariables.get("id"),
disabled: false
},
{
key: "pwd",
value: pm.collectionVariables.get("pwd"),
disabled: false
}
]
}
}, function (err, res) {
let res_data = res.json();
// 로그인 결과값 환경 변수에 저장
pm.collectionVariables.set("accessToken", res_data.data.access_token);
pm.collectionVariables.set("refreshToken", res_data.data.refresh_token);
}
);
Comments