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
- rx
- Android
- MediaSession
- google play
- mvvm
- mysql
- Reactive
- 테스트 자동화
- MotionLayout
- 동영상
- Animation
- SwiftUI Tutorial
- MediaPlayer
- Kotlin
- node.js
- android13
- SWIFTUI
- GCP
- Observable
- RxKotlin
- paging
- php
- Android 13
- 인앱결제
- databinding
- node
- Koin
- junit
- PagingLib
- list
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