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, ∼5207🔥, 0💬
Popular Posts:
Where to get a real Atom XML example? You can follow this tutorial to get a real Atom XML example: 1...
How To Move Uploaded Files To Permanent Directory in PHP? PHP stores uploaded files in a temporary d...
What is the Azure AD v1.0 OpenID Metadata Document? Azure AD v1.0 OpenID Metadata Document is an onl...
How to pull NVIDIA CUDA Docker Image with the "docker image pull nvidia/cuda" command? If you are ru...
How to use the "set-variable" Policy Statement to create custom variables for an Azure API service o...