How to do a simple post request using HTTP request plugin

51 views
Skip to first unread message

steliosP

unread,
Mar 18, 2016, 10:27:51 AM3/18/16
to Jenkins Users

I am trying to do a post request using HTTP plugin. One basic question: where do you put the content you want to post?I cannot find any related field. Please have a look at the screenshot of the plugin provided parameters

Martin d'Anjou

unread,
Mar 21, 2016, 2:30:15 PM3/21/16
to Jenkins Users
I don't think there is a way to enter post data. According to the code, the post data is simply the list of parameters (which parameters I don't remember):
https://github.com/jenkinsci/http-request-plugin/blob/master/src/main/java/jenkins/plugins/http_request/util/HttpClientUtil.java#L81

You can probably try to fill different configuration fields of the plugin and post to http://httpbin.com/post to see what happens.

Martin

steliosP

unread,
Mar 23, 2016, 7:28:01 AM3/23/16
to Jenkins Users
Thanks Martin for the response. This is kind of odd, not to say ridiculous, since there are extremely rare cases where someone would POST something without a post body!
In any case, for future readers of this question, I would say that I bypassed this problem by using shell/batch script in Jenkins that contained a curl
Reply all
Reply to author
Forward
0 new messages