i have an proxy with simply endpoint of https://mocktarget.apigee.net/json and inside this proxy i added a access entity policy and inside this policy I got developer mail id and extract developer email id in a email variable
now i want my this email-id should be visible in a body whenever we hit on api
here is my code that i wrote in a assign message policy
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <AssignMessage async="false" continueOnError="false" enabled="true" name="EchoVariables"> <DisplayName>EchoVariables</DisplayName> <IgnoreUnresolvedVariables>true</IgnoreUnresolvedVariables> <Set> <Headers> <Header name="X-Developer-email">{developer.email}</Header> </Headers> </Set> <AssignTo createNew="false" transport="http" type="response"/> </AssignMessage>
this is got developer email and how can send this to api's body
The documentation for AssignMessage shows how you can set the body, or Payload of any message.
See this example for how to refer to a variable in a Payload element.
User | Count |
---|---|
2 | |
2 | |
1 | |
1 | |
1 |