What should be the approach ?
Solved! Go to Solution.
You can use the Headers element to do that:
<Headers> <Header name="new_header">{extracted_variable}</Header> </Headers>
Hi @GAURAV can you upload your proxy here?
Basically it should take an Assign Message policy (in Target Endpoint / Pre-Flow / Request Segment) to do what you describe here.
For eg assuming the extracted variable name is "extracted_variable":
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <AssignMessage async="false" continueOnError="false" enabled="true" name="Set-Target-Endpoint-Query-Parameters"> <DisplayName>Set Target Endpoint Query Parameters</DisplayName> <Add> <QueryParams> <QueryParam name="new_param">{extracted_variable}</QueryParam> </QueryParams> </Add> </AssignMessage>
You can use AssignMessage policy in your TargetEndpoint preflow or conditional flow,and use the same extracted variable names.
Thanks. I will try the above solution and let you know the result.
I was able to set the variable in query param as suggested above.
Please do tell how we can set in request header.
Thans
You can use the Headers element to do that:
<Headers> <Header name="new_header">{extracted_variable}</Header> </Headers>
You can take a look at this page in the doc. It has examples of using AssignMessage to set query params, headers, and other parts of a request or response.
Stephen