You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Does the webhook EventSource support contentTypes other than 'application/json'? For example, I have an external service that uses the 'application/x-www-form-urlencoded' contentType. I receive the following error when using the webhook EventSource, which looks like a parsing error because the webhook eventsource is expecting json:
{"level":"error","ts":1647980958.51209,"logger":"argo-events.eventsource","caller":"webhook/start.go:124","msg":"failed to construct the event payload","eventSourceName":"gfycore","eventSourceType":"webhook","eventName":"job","endpoint":"/job/","port":"12000","http-method":"POST","error":"json: error calling MarshalJSON for type *json.RawMessage: invalid character 'i' looking for beginning of value","stacktrace":"github.com/argoproj/argo-events/eventsources/sources/webhook.(*Router).HandleRoute\n\t/home/runner/work/argo-events/argo-events/eventsources/sources/webhook/start.go:124\ngithub.com/argoproj/argo-events/eventsources/common/webhook.startServer.func2\n\t/home/runner/work/argo-events/argo-events/eventsources/common/webhook/webhook.go:148\nnet/http.HandlerFunc.ServeHTTP\n\t/opt/hostedtoolcache/go/1.17.1/x64/src/net/http/server.go:2046\ngithub.com/gorilla/mux.(*Router).ServeHTTP\n\t/home/runner/go/pkg/mod/github.com/gorilla/mux@v1.8.0/mux.go:210\nnet/http.serverHandler.ServeHTTP\n\t/opt/hostedtoolcache/go/1.17.1/x64/src/net/http/server.go:2878\nnet/http.(*conn).serve\n\t/opt/hostedtoolcache/go/1.17.1/x64/src/net/http/server.go:1929"}
I see the slack eventsource has some support for the 'x-www-form-urlencoded' content type here. Would support of the 'x-www-form-urlencoded' contentType on a webhook require a custom eventsource implementation?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Does the webhook EventSource support contentTypes other than 'application/json'? For example, I have an external service that uses the 'application/x-www-form-urlencoded' contentType. I receive the following error when using the webhook EventSource, which looks like a parsing error because the webhook eventsource is expecting json:
I see the slack eventsource has some support for the 'x-www-form-urlencoded' content type here. Would support of the 'x-www-form-urlencoded' contentType on a webhook require a custom eventsource implementation?
Beta Was this translation helpful? Give feedback.
All reactions