I'm trying to to send webhook in cloudevents format to Azure Event Grid and I'm getting errors like:
"HTTP Error 400. The request has an invalid header name."
For cloudevents specification, the required content-type is: application/cloudevents+json; charset=utf-8
However, for webhook we have hardcoded parameter application/json:
Dear Source Code Maintainers.
I'm trying to to send webhook in cloudevents format to Azure Event Grid and I'm getting errors like: "HTTP Error 400. The request has an invalid header name."
For cloudevents specification, the required content-type is: application/cloudevents+json; charset=utf-8 However, for webhook we have hardcoded parameter application/json:
https://github.com/resmoio/kubernetes-event-exporter/blob/master/pkg/sinks/webhook.go line: 52 req.Header.Add("Content-Type", "application/json")
Is it possible to support custom content-type header for webhook? Many thanks for answer and help.
Best Regards. W.