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, 2503🔥, 0💬
Popular Posts:
How to validate the id_token signature received from Azure AD v2.0 authentication response? You can ...
How to pull NVIDIA CUDA Docker Image with the "docker image pull nvidia/cuda" command? If you are ru...
How to use "{{...}}" Liquid Codes in "set-body" Policy Statement? The "{{...}}" Liquid Codes in "set...
How To Pad an Array with the Same Value Multiple Times in PHP? If you want to add the same value mul...
How To Avoid the Undefined Index Error in PHP? If you don't want your PHP page to give out errors as...