Tools, FAQ, Tutorials:
'find-and-replace' Policy Statement
How to use the "find-and-replace" Policy Statement for an Azure API service operation?
✍: FYIcenter.com
The "find-and-replace" Policy Statement
allows you to find and replace a sub string in the request body or response body.
For example, the following inbound policy will replace "$id" by the template parameter "id" value in the request body:
<inbound> <find-and-replace from="$id" to="@(context.Request.MatchedParameters["id"]" /> </inbound>
The following outbound policy will replace "$key" by "xxxxxx" in the response body:
<outbound> <find-and-replace from="$key" to="xxxxxx" /> </outbound>
For some reason, the "find-and-replace" statement in the inbound policy will cause issues for some backend services. So use it only in outbound policy.
⇒ 'xml-to-json' Policy Statement
⇐ Policy to Modify Request and Response Body
2018-01-19, 3860👍, 0💬
Popular Posts:
Where to see some Examples of Invalid JSON Values? Here are some Examples of Invalid JSON Values: 1....
Where to find tutorials on Visual Studio? I want to know How to learn Visual Studio. Here is a large...
How to Instantiate Chaincode on BYFN Channel? You can follow this tutorial to Instantiate Chaincode ...
How to use the Atom Online Validator at w3.org? w3.org feed validation service is provided at http:/...
What is EPUB 3.0 Metadata "dc:publisher" and "dc:rights" elements? EPUB 3.0 Metadata "dc:publisher" ...