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, 2958🔥, 0💬
Popular Posts:
How to use urllib.parse.urlencode() function to encode HTTP POST data? My form data has special char...
How To Change Text Fonts for Some Parts of a Paragraph? If you want to change text fonts or colors f...
How To Create an Array with a Sequence of Integers or Characters in PHP? The quickest way to create ...
How to use the "return-response" Policy statement to build the response from scratch for an Azure AP...
How to create Hello-3.1.epub with WinRAR? I have all required files to create Hello-3.1.epub. To cre...