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, ∼2161🔥, 0💬
Popular Posts:
Where to find tutorials on PHP language? I want to know how to learn PHP. Here is a large collection...
How to use the "send-one-way-request" Policy statement to call an extra web service for an Azure API...
Where to find tutorials on Visual Studio? I want to know How to learn Visual Studio. Here is a large...
How to read Atom validation errors at w3.org? If your Atom feed has errors, the Atom validator at w3...
How to read RSS validation errors at w3.org? If your RSS feed has errors, the RSS validator at w3.or...