The GitHub webhook handler demonstrates some of this stuff:
https://github.com/jenkinsci/github-plugin/blob/27a9d6f/src/main/java/com/cloudbees/jenkins/GitHubWebHook.java#L155-L167

If you want to read the POST body, as opposed to a form variable (as the GitHub plugin is doing), you can call req.getInputStream().

Regards,
Chris


On 12/03/15 01:59, Justin Paston-Cooper wrote:
Hello,

Gitlab can be configured to have "web hooks" which POST JSON data
describing merge requests to chosen URLs. In my case, I would like to
have a single Jenkins job to POST to, which would handle all merge requests.

After extensive searching, I have been unable to find a plugin which is
able to read POST body (and preferably the headers). It doesn't seem
possible to configure Gitlab to pass the data as a URL parameter. Is
there a specific reason why there is no such plugin? Is there an
alternative?

Thanks,

Justin Paston-Cooper

--
You received this message because you are subscribed to the Google
Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to [email protected]
<mailto:[email protected]>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-dev/CAEndGgQ6hoX7z2VQndHw1mydgsvzgbXMqvksxEEKbtSZh_EWRQ%40mail.gmail.com
<https://groups.google.com/d/msgid/jenkinsci-dev/CAEndGgQ6hoX7z2VQndHw1mydgsvzgbXMqvksxEEKbtSZh_EWRQ%40mail.gmail.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Jenkins 
Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/55073C06.1070301%40orr.me.uk.
For more options, visit https://groups.google.com/d/optout.

Reply via email to