I am trying to execute an HTTP request in a Jenkins Pipeline Job using the HTTPRequest plugin
script{def response = httpRequest authentication: 'CredentialsID', url: "https://host/api/project-summary/kj/?kj=123"}
I created credentials with the ID "CredentialID" in Jenkins.
I get the following error when creating a task -

I already mentioned this question about StackOverflow, but that didn't help.
Can anyone point out an error in this or is there some other approach that I can use to make an HTTP request from the Jenkins Pipeline Job?
UPDATE: I also created credentials with the id - "CredentialsID" in jenkins, as shown below:

source
share