We all pretty well know that the request and response format for JIRA REST API are in the form of JSON. I successfully retrieved the attachment details of the uploaded files using the url of type http://example.com:8080/jira/rest/api/2/attachment
.
I now need to work on file upload on to JIRA using the same REST API. I own a java client and its stated tat I need to post multipart input using MultiPartEntity
. I do not know how to submit a header of X-Atlassian-Token: nocheck
with the JSON request. Searching the documents I got only curl based request examples. Can anyone help me fixing this?
I've done it this way, and it works:
This is how i did it dependencies okhttp and okio