question

Upvotes
Accepted
3 0 0 2

Postman how to get request body with already substituted variables

Hi,

could you help me with one thing

I need to save request body (json with variables) to use it later in my prerequest script. Unfortunately when I display request data

console.log(request.data);

It looks for example like this:

{

"session": "{ {session}}",

"playerid": "{ {playerid}}",

"currency": "{ {currencyCode}}",

"action":

{ "command": "com",

"parameters": {

"country": "{ {countryCode}}"

} } }

Is there a possibility to get request body in Pre-req. with already substituted variables?

tick-history-rest-apipostman
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
Accepted
13.7k 26 8 12
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
3 0 0 2

Working great, thank you!

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Click below to post an Idea Post Idea