Last active
May 23, 2019 08:59
-
-
Save BadgerCode/cf06e1de4f14d4fcb3f94abe59f6361a to your computer and use it in GitHub Desktop.
Azure API Management debug response
This file contains hidden or 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
<policies> | |
<inbound> | |
<base /> | |
<return-response> | |
<set-status code="200" /> | |
<set-header name="Content-Type" exists-action="override"> | |
<value>application/json</value> | |
</set-header> | |
<set-body>@{ | |
var response = new JObject(); | |
response["AccountReference"] = context.Variables.GetValueOrDefault<string>("AccountReference"); | |
response["GatewayId"] = context.Variables.GetValueOrDefault<string>("GatewayId"); | |
response["Variables"] = JObject.FromObject(context.Variables); | |
response["MatchedParameters"] = JObject.FromObject(context.Request.MatchedParameters); | |
response["url"] = JObject.FromObject(context.Request.Url); | |
return response.ToString(); | |
}</set-body> | |
</return-response> | |
</inbound> | |
<backend> | |
<base /> | |
</backend> | |
<outbound> | |
<base /> | |
</outbound> | |
<on-error> | |
<base /> | |
</on-error> | |
</policies> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment