Created
May 18, 2018 18:39
-
-
Save dbarkol/43af75d16dc3bffaaa1be9a97266ba38 to your computer and use it in GitHub Desktop.
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
| <when condition="@(context.Variables.GetValueOrDefault<bool>("isEventGridSubscriptionValidation"))"> | |
| <return-response> | |
| <set-status code="200" reason="OK" /> | |
| <set-body>@{ | |
| var events = context.Request.Body.As<string>(); | |
| JArray a = JArray.Parse(events); | |
| var eventGridData = a.First["data"]; | |
| var validationCode = eventGridData["validationCode"]; | |
| var jOutput = | |
| new JObject( | |
| new JProperty("validationResponse", validationCode) | |
| ); | |
| return jOutput.ToString(); | |
| }</set-body> | |
| </return-response> | |
| </when> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment