Reputation: 2682
I am trying to fetch the response code for my ELB using the following Jenkins Pipeline DSL method and using ignoreSslErrors: true
to ignore the SSL error:
def elbResponse = httpRequest url: "https://my-elb-url.com", ignoreSslErrors: true
However, when I build my job I get the following error;
java.lang.IllegalArgumentException: Expected named arguments but got [{ignoreSslErrors=true}, https://my-elb-url.com
]
Is there something syntactically wrong with the way I am trying to bypass the SSL errors?
Upvotes: 1
Views: 2135
Reputation:
def elbResponse = httpRequest (url: ‘https://my-elb-url.com’, ignoreSslErrors: true, httpMode: ‘GET’)
You appear to be missing the parenthesis.
Also, if “fetching” (GET), specify that httpMode, as the default is POST.
Upvotes: 1