Reputation: 51
I am using below curl command:
curl -u "nnarayan1" https://ipsddress:port/api/v3/orgs/RB-Health-rbESB/repos --insecure
How can I get output of above curl command using groovy scripting?
Kindly suggest groovy script for this.
I tried different solution from stackoverflow, none of them is working.
Upvotes: 1
Views: 17715
Reputation: 1648
def response
response = sh(
script: 'curl --insecure -u nnarayan1 https://ipsddress:port/api/v3/orgs/RB-Health-rbESB/repos',
returnStdout: true
)
I would personally avoid specifying the "--insecure" flag.
Upvotes: 1
Reputation: 528
def res = sh(script: 'curl --insecure -u nnarayan1 https://ipaddress:port/api/v3/orgs/RB-Health-rbESB/repos', returnStdout: true)
Upvotes: 1