-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support for Non Xml Encoded policies (#2791)
- Loading branch information
1 parent
a4d16b1
commit 9e18b82
Showing
3 changed files
with
53 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
....ApiManagement/preview/2018-01-01/examples/ApiManagementCreateApiPolicyNonXmlEncoded.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
{ | ||
"parameters": { | ||
"serviceName": "apimService1", | ||
"resourceGroupName": "rg1", | ||
"api-version": "2018-01-01", | ||
"subscriptionId": "subid", | ||
"apiId": "5600b57e7e8880006a040001", | ||
"policyId": "policy", | ||
"If-Match": "*", | ||
"parameters": { | ||
"properties": { | ||
"policyContent": "<policies>\r\n <inbound>\r\n <base />\r\n <set-header name=\"newvalue\" exists-action=\"override\">\r\n <value>\"@(context.Request.Headers.FirstOrDefault(h => h.Ke==\"Via\"))\" </value>\r\n </set-header>\r\n </inbound>\r\n </policies>", | ||
"contentFormat": "rawxml" | ||
} | ||
} | ||
}, | ||
"responses": { | ||
"201": { | ||
"body": { | ||
"id": "/subscriptions/4c1a3bc6-89f9-46fe-a175-5d8984b25095/resourcegroups/Api-DF-West-US/providers/Microsoft.ApiManagement/service/samirmsiservice2/apis/echo-api/operations/create-resource/policies/policy", | ||
"type": "Microsoft.ApiManagement/service/apis/operations/policies", | ||
"name": "policy", | ||
"properties": { | ||
"policyContent": "<policies>\r\n <inbound>\r\n <base />\r\n <set-header name=\"newvalue\" exists-action=\"override\">\r\n <value>\"@(context.Request.Headers.FirstOrDefault(h => h.Ke==\"Via\"))\" </value>\r\n </set-header>\r\n </inbound>\r\n</policies>" | ||
} | ||
} | ||
}, | ||
"200": { | ||
"body": { | ||
"id": "/subscriptions/4c1a3bc6-89f9-46fe-a175-5d8984b25095/resourcegroups/Api-DF-West-US/providers/Microsoft.ApiManagement/service/samirmsiservice2/apis/echo-api/operations/create-resource/policies/policy", | ||
"type": "Microsoft.ApiManagement/service/apis/operations/policies", | ||
"name": "policy", | ||
"properties": { | ||
"policyContent": "<policies>\r\n <inbound>\r\n <base />\r\n <set-header name=\"newvalue\" exists-action=\"override\">\r\n <value>\"@(context.Request.Headers.FirstOrDefault(h => h.Ke==\"Via\"))\" </value>\r\n </set-header>\r\n </inbound>\r\n</policies>" | ||
} | ||
} | ||
} | ||
} | ||
} |