Tools, FAQ, Tutorials:
'{{...}}' Liquid Codes in 'set-body' Policy Statement
How to use "{{...}}" Liquid Codes in "set-body" Policy Statement?
✍: FYIcenter.com
The "{{...}}" Liquid Codes in "set-body" Policy Statement allows you
to insert object properties of the original request in JSON format
and object properties of the built-in "context" object.
For example, the following "set-body" builds an XML document as the Azure request body by converting JSON object properties from the original client request body to XML elements:
<set-body template="liquid">
<soap:Envelope xmlns="http://fyicenter.com/"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<GetOrders>
<Customer>{{body.getOrders.customer}}</Customer>
</GetOrders>
</soap:Body>
</soap:Envelope>
</set-body>
You can also access the following properties of the built-in object "context" using Liquid codes "{{...}}":
context.
Request.
Url.
Scheme
Host
Port
Path
Query
QueryString
ToUri
ToString
Method
OriginalMethod
OriginalUrl.
...
IpAddress
MatchedParameters
HasBody
ClientCertificates
Headers
Response.
StatusCode
Method
Headers
For more information on "{{...}}" Liquid codes, see Liquid code Website.
⇒ Policy to Control Backend Service
⇐ 'set-body' Azure API Policy Statement
2017-12-04, ∼5867🔥, 0💬
Popular Posts:
How to reinstall npm with a node version manager? I am getting permission errors with the current ve...
How to use "{{...}}" Liquid Codes in "set-body" Policy Statement? The "{{...}}" Liquid Codes in "set...
How to add a new operation to an API on the Publisher Dashboard of an Azure API Management Service? ...
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 EPUB 2.0 Metadata "dc:creator" and "dc:contributor" elements? EPUB 2.0 Metadata "dc:creator"...