0

I have been struggling with Jenkins lately, and I'm stuck because I wanna send some parameters through HTTP Post, and I know how to do it, but the thing is that I am saving a Http request response to a file in my workspace, and then I want to use that file, read it and send the text I saved previously to a new HTTP Request, does anyone have any idea how can I achieve this?

Thanks in advance!!!

popquinto
  • 33
  • 3
  • 8
  • how are you sending your second http request? if curl would work, see https://stackoverflow.com/a/15913105/6090676. – burnettk Jun 15 '17 at 23:54

3 Answers3

0

Install copy artifacts from another project plugin ( copy artifacts) add in build steps store the file in your workspace then you can run a shell script to read the desired content from that file .

  • Use this in your first job and give target project your second job .. so that your second job/project will be having the output file already there . Then you can write shell script to reqd the content – Danish Ansari Jun 15 '17 at 22:23
  • If comment is part of your answer edit your answer and put it there. – Ori Marko Jun 27 '17 at 04:20
0

if curl would work, that would be a simple way to send a file's contents as your POST body. see this answer.

burnettk
  • 13,557
  • 4
  • 51
  • 52
0

Jenkins can work with Jmeter and Jmeter is great tool for handling request and response see tutorial

Ori Marko
  • 56,308
  • 23
  • 131
  • 233