Tools, FAQ, Tutorials:
Using the 'context' Object in Policy Expressions
How to use the built-in "context" object in Policy expressions?
✍: FYIcenter.com
The built-in "context" object can be used any "@(...)" expressions or "@{...}" expression blocks.
The "context" object allows you to access information related to Azure API operation
through its properties and methods.
Here are some examples "context" properties and methods:
@(context.Api.Name) - Returns the name of this API. @(context.Operation.UrlTemplate) - Returns the URI template of this operation. @(context.Request.Method) - Returns the method verb of the request. @(context.Response.Body.As<JObject>()) - Converts the response body into a JSON Object.
For more information on the built-in "context" object, see API Management policy expressions Website.
⇒ 'context.Request.MatchedParameters' URL Template Parameters
2018-02-14, ∼3962🔥, 0💬
Popular Posts:
How to access Request body from "context.Request.Body" object in Azure API Policy? Request body is t...
Why I am getting "The Windows SDK version 8.1 was not found" error, when building my C++ application...
How to add images to my EPUB books Images can be added into book content using the XHTML "img" eleme...
How to attach console to a Running Container using the "docker container exec" command? I want to ge...
How to detect errors occurred in the json_decode() call? You can use the following two functions to ...