Currently my output from default Post-flow response represents a JSON object. My new requirement has the necessity to represent the ultimate output as JSON as well as convert it to XML. Is there an APIGEE policy to represent both the format or should I create a customized policy. For Example : When I test my backend using Postman , the Headers tab should allow accept key and value to be application/atom+xml or application/json.
Welcome to the community !! Please check the JSON2XML policy
yes, and wrap this policy in a Condition that examines the Accept header. eg,
<Step> <Name>XMLToJSON-1</Name> <Condition>request.header.accept =| "application/json"</Condition> </Step>