This is my first step working with Jira Rest API and I will only return simple serverInfo
Here is my Groovy Script:
def jira = new RESTClient(JIRAURL + "/rest/api/2/");
jira.headers['Content-Type']='application/json'
jira.headers['Authorization']="Basic " + "username:password".bytes.encodeBase64().toString()
println jira.get(path:'serverInfo')
If I execute my script I get this Exception:
java.lang.NoSuchFieldError: defaultRequestContentType
at groovyx.net.http.HTTPBuilder$RequestConfigDelegate.<init>
(HTTPBuilder.java:989)
Can anyone help me please?