Tools, FAQ, Tutorials:
Policy to Echo the Request Body Only
How to write a policy to echo the request body only?
✍: FYIcenter.com
Here is a policy that echoes the request body only:
<!-- Echo-Policy.xml
Copyright (c) FYIcenter.com
-->
<policies>
<inbound>
</inbound>
<backend>
</backend>
<outbound>
<return-response>
<set-status code="200" reason="Ok"/>
<set-body>@(context.Request.Body.As<string>())</set-body>
</return-response>
</outbound>
<on-error>
</on-error>
</policies>
If you specify this policy to your API operation, the client request will not be forwarded to any backend services.
Azure will return the request body as the response body with a status code of 200.
2017-10-23, ∼2685🔥, 0💬
Popular Posts:
How To Copy Array Values to a List of Variables in PHP? If you want copy all values of an array to a...
What is Azure API Management Publisher Dashboard? Azure API Management Publisher Dashboard is an Azu...
How to use the JSON to XML Conversion Tool at freeformatter.com? If you want to try the JSON to XML ...
What are the differences of Differences of evaluateTransaction() and submitTransaction() of the fabr...
What Is Azure API Management Service? Azure API Management as a turnkey solution for publishing APIs...