The following example creates a custom request object with Assign Message:
<AssignMessage name="AssignMessage-3"> <AssignTo createNew="true" type="request">MyCustomRequest</AssignTo> <Copy> <Headers> <Header name="user-agent"/> </Headers> </Copy> <Set> <QueryParams> <QueryParam name="address">{request.queryparam.addy}</QueryParam> </QueryParams> <Verb>GET</Verb> </Set> <IgnoreUnresolvedVariables>false</IgnoreUnresolvedVariables> </AssignMessage>
This example:
user-agent
HTTP header from the incoming
request to the new message. Because <Copy>
uses an absolute reference to the
user-agent
flow variable, there is no
need to specify the source
attribute to <Copy>
.address
query parameter on the custom message to the value of
the incoming request's addy
query parameter.GET
.<IgnoreUnresolvedVariables>
to "false". When <IgnoreUnresolvedVariables>
is "false", if one of the variables the policy tries to add does not exist, Edge will stop
processing in the API flow.