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

我是研究僧i 提交于 2020-01-14 05:23:11

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!