jenkinsci / generic-webhook-trigger-plugin

Can receive any HTTP request, extract any values from JSON or XML and trigger a job with those values available as variables. Works with GitHub, GitLab, Bitbucket, Jira and many more.
https://plugins.jenkins.io/generic-webhook-trigger
404 stars 159 forks source link

request Payload is not getting parsed if content-type is application/x-www-form-urlencoded #225

Closed sonal-chauhan closed 2 years ago

sonal-chauhan commented 2 years ago

I am integrating jenkins with slack-interactive-messages via generic-webhook-trigger-plugin where slack-interactive-message-responseURL is of generic-webhook-trigger url. Problem is that slack use to call slack-interactive-message-responseURL with content-type as application/x-www-form-urlencoded (inbuild functionality of slack) and generic-webhook-trigger-plugin only parses requestBody If content-type is application/json.

i tried hitting the same webhook url on method = post with requestBody and its parsing requestBody when content-type is application/json and not parsing requestBody when content-type is application/x-www-form-urlencoded.

One more thing , requestBody is getting parsed with method=get even if the content-type is application/x-www-form-urlencoded

can't it parse the requestbody on method=post & content-type = application/x-www-form-urlencoded ?

tomasbjerre commented 2 years ago

Try 1.78. It should consume application/x-www-form-urlencoded

sonal-chauhan commented 2 years ago

Try 1.78. It should consume application/x-www-form-urlencoded

@tomasbjerre Thanks for 1.82.