Hi,
I want to save the request body sent to the target server, for latter log. For that I used a AM policy in the postflow of the target
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<AssignMessage async="false" continueOnError="false" enabled="true" name="AM-SetVarsToTarget">
<IgnoreUnresolvedVariables>true</IgnoreUnresolvedVariables>
<DisplayName>AM-SetVarsToTarget</DisplayName>
<AssignVariable>
<Name>target.request.body</Name>
<Value>DefaultReq</Value>
<Ref>message.content</Ref>
</AssignVariable>
<AssignVariable>
<Name>target.request.querystring</Name>
<Ref>message.querystring</Ref>
</AssignVariable>
</AssignMessage>
But when I try to use the target.request.body variable in the PostClientFlow, for logging purposes the variable is empty. When using the debug view I see a unequal sign next to the variable
Any clues of what I'm doing wrong here?
Thanks!
Solved! Go to Solution.
YES
The ''unequal" sign means you cannot assign to that variable. (More precisely, it means the assign failed). I believe you want target.request.content
.
Can you try assigning to that?