0
郵便受け(pm)api呼び出しを実行して、テストタブから要求を実行しようとしています。 応答としてバックストリームを取得します(コンソールには、整数を含む配列としてログインします)。pm api sendRequestによって生成されたストリーム応答を読み取る方法
これらのストリームの読み取り方法については、
要求:
pm.sendRequest({
url: myUrl,
method: 'GET',
header: {
'content-type': 'application/json'
}
}, function (err, res) {
console.log(res)
});
応答:
Object:{}
code:200
cookie:[]
header:[]
0:{}
1:{}
2:{}
3:{}
4:{}
5:{}
6:{}
id:"e5d5d6d6"
responseSize:55551
responseTime:263
status:"OK"
stream:{}
data:[]
0:123
1:10
2:32
3:32
4:34
5:115
6:119
7:97
8:103
9:103
10:101
11:114
12:34
13:32
14:58
15:32
16:34
17:50
18:46
19:48
20:34
21:44
22:10
23:32
24:32
25:34
ありがとうございます - 実際にはres.json()が動作しています – BabyGroot
@BabyGrootええ、レスポンス**ボディ**が必要な場合は、['json()'](http://www.postmanlabs。 com/postman-collection/Response.html#json) - 確かに – Alfageme