I am able to access Jira cloud using Unirest Java library and basic authentication. Thanks to the Stackflowers for making it possible.
I would like to update one sample ticket's priority using the same. Below is the groovy code. Its not working but. Could you please identify where is my mistake.
result =
Unirest.put("https://mysite.atlassian.net/rest/api/2/issue/TIC-1")
.basicAuth("myuser","mypwd")
.header('Content-Type', 'application/json')
.body([fields: [priority: [name: 'High']]]).asString
println result.status
Error displayed is:
enter code hereCaught: java.lang.RuntimeException: Serialization Impossible.
Can't find an ObjectMapper implementation.
java.lang.RuntimeException: Serialization Impossible. Can't find an
ObjectMapper implementation.
com.mashape.unirest.request.HttpRequestWithBody.body(HttpRequestWithBody.jav
a:155)
com.mashape.unirest.request.HttpRequestWithBody$body$1.call(Unknown Source)
JiraClient.run(JiraClient.groovy:51)
All Maven dependencies added already and Unirest.get() request/responses working properly.