gandalf_the_cool
gandalf_the_cool

Reputation: 718

Where body is put in post with http request plugin in jenkins

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

Upvotes: 1

Views: 6472

Answers (2)

Rakesh
Rakesh

Reputation: 82765

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

Upvotes: 2

Janario Oliveira
Janario Oliveira

Reputation: 41

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

Upvotes: 1

Related Questions