Hi.
(I know this is already too late, but just in case it's needed by anyone
else.)
That can be done by assigning the value of the "response.body" variable
(i.e. "{{response.body}}") to the variable you want, for example:
{
"prefix": "",
"type": "StandAlone",
"parameters": {
"tokenStart": "{{",
"tokenEnd": "}}",
"tokens": {},
"elementType": "ZestVariables"
},
"statements": [
{
"url": "
http://example.com/",
"data": "",
"method": "GET",
"headers": "",
"assertions": [],
"followRedirects": false,
"cookies": [],
"index": 1,
"enabled": true,
"elementType": "ZestRequest"
},
{
"string": "{{response.body}}",
"variableName": "var",
"index": 2,
"enabled": true,
"elementType": "ZestAssignString"
},
{
"message": "{{var}}",
"index": 3,
"enabled": true,
"elementType": "ZestActionPrint"
}
],
"authentication": [],
"index": 0,
"enabled": true,
"elementType": "ZestScript"
}
Best regards.
On 16/02/16 20:54, Varun Sharma wrote:
> Hi,
>
> I want to assign the whole response body to a variable using Zest in ZAP.
>
> Assigning part of *response.body* to a variable was easy but i cant get to
> assign whole of the *response.body* to a variable. Any help will be highly
> appreciated.
>
> Thanks!
>