1

This might be the silliest question, but definitely it is not obvious. I am trying to send a POST request in Jenkins, using the HTTP Request Plugin. However I cannot find a field to put the body message/content, that I want to post. Any ideas? This is a screenshot of the available options http request plugin

gandalf_the_cool
  • 659
  • 2
  • 9
  • 23

2 Answers2

2

You can submit the body content using requestBody

httpRequest authentication: "credentialsID", contentType: "APPLICATION_JSON", httpMode: "POST", requestBody: JsonOutput.toJson(VALUE), url: dest_url

More Info: HTTP Request Plugin

Rakesh
  • 81,458
  • 17
  • 76
  • 113
1

Right now there is no support to send body content.

There is a pull request under approval and it might be merged soon. https://github.com/jenkinsci/http-request-plugin/pull/14