Hi,
I'm trying to invoke a web hook from a plugin, which works successfully but the string returned from IServiceEndpointNotificationService.Execute is null.
web hook:
public static async Task<HttpResponseMessage> Run([HttpTrigger(AuthorizationLevel.Function, "post", WebHookType = "genericJson", Route = null)]HttpRequestMessage req, TraceWriter log)
just returning:
var contextJson = await req.Content.ReadAsStringAsync();
var context = contextJson.GetContext();
return req.CreateResponse(HttpStatusCode.OK, "Created");
I'm calling the web hook from the plugin with this line:
cloudService.Execute(new EntityReference("serviceendpoint", endpoint.Id), Context);
I can see in my plugin traces and azure logs that the function is being hit and returning the right message (also seen from postman) but when it gets back to the plugin the response message is null.
The plugin is running synchonously, tried on pre-operation and post-operation but no difference.
Any ideas?
Thanks