{
"args": {},
"data": "{\"userId\": 777, \"username\": \"Bob\"}",
"files": {},
"form": {},
"headers": {
"x-forwarded-proto": "https",
"x-forwarded-port": "443",
"host": "postman-echo.com",
"x-amzn-trace-id": "Root=1-5f0b0dea-dccf35429759ee425a86bd98",
"content-length": "34",
"content-type": "text/plain",
"user-agent": "PostmanRuntime/7.26.1",
"accept": "*/*",
"postman-token": "a7fa3df7-4bf3-4c58-a5e8-3604fbdf6dbc",
"accept-encoding": "gzip, deflate, br",
"cookie": "sails.sid=s%3AWjeqmvVrZYK5CLY3wWe7XWC6GxGTs_r4.upPw2jg33xMY%2BpNuh5xwTnMCna4YNzj24o48ukBawaA"
},
"json": null,
"url": "https://postman-echo.com/post"
}
Хочу получить userId, но вот так не работает,
pm.response.json().data.userId
, возвращает
undefined