How catch curl response into variable in Jenkinsfile
问题 I want to curl an URL and capture the response into a variable. when I curl a command and echo its output I get the correct response as below sh 'output=`curl https://some-host/some-service/getApi?apikey=someKey`;echo $output;' I want to catch the same response into a variable and use that response for further operation Below is my Jenkinsfile pipeline { agent { label "build_2" } stages { stage('Build') { steps { checkout scm sh 'npm install' } } stage('Build-Image') { steps { echo '.........