HTTP Request using Jenkins Pipeline Job

女生的网名这么多〃 提交于 2020-01-06 06:45:25

问题


I have been trying to do HTTP request in Jenkins Pipeline Job using HTTPRequest plugin

script{def response = httpRequest authentication: 'CredentialsID',  url: "https://host/api/project-summary/kj/?kj=123"}

I have created Credentials with the ID 'CredentialID' in Jenkins.

I am getting the following error when I build the job-

I have already referred to this question on StackOverflow but it didn't help.

Could someone point out the mistake in this or is there some other approach that I can use to make HTTP Request from Jenkins Pipeline Job?

UPDATE: I have also created the Credentials with the ID - 'CredentialsID' in jenkins as shown below:

来源:https://stackoverflow.com/questions/48166066/http-request-using-jenkins-pipeline-job

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