I am using extract variable policy and i want to extract a variable through JSON response, The variable i want to extract is "HOST" but when i trace my policy i am unable to get value in my defined
variable.
Following is my Extract Variable Policy:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <ExtractVariables async="false" continueOnError="false" enabled="true" name="EV_origion"> <DisplayName>EV_origion</DisplayName> <IgnoreUnresolvedVariables>true</IgnoreUnresolvedVariables> <JSONPayload> <Variable name="Host"> <JSONPath>$.headers[4].Host</JSONPath> </Variable> </JSONPayload> <Source>response.content</Source> <VariablePrefix>myHost</VariablePrefix> </ExtractVariables>
Solved! Go to Solution.
Yes i did try this, still same result unfortunately.
Could you please comment the <VariablePrefix> part for time being and store the value in Variable name "Host" only test it.
It working fine for me.
:Yes it is working now !! Great Thanks alot
Kindly accept the answer as it will be beneficial to other's. 🙂