Tools, FAQ, Tutorials:
Policy to Echo the Request Body Only
How to write a policy to echo the request body only?
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.
â‡’ Policy to Set and Get Custom Variables
2017-10-23, 1299👍, 0💬
How To Read a File in Binary Mode in PHP? If you have a file that stores binary data, like an execut...
How to add images to my EPUB books Images can be added into book content using the XHTML "img" eleme...
How to add request URL Template Parameters to my Azure API operation 2017 version to make it more us...
Can Two Forms Be Nested? Can two forms be nested? The answer is no and yes: No. You can not nest two...
How to use the "set-variable" Policy Statement to create custom variables for an Azure API service o...