问题
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
回答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
回答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
来源:https://stackoverflow.com/questions/36082421/where-body-is-put-in-post-with-http-request-plugin-in-jenkins