Hi,
I need to submit a REST request to JIRA, creating an attachment.
This is an example of a successfull call, attaching a txt file, submitted thorugh Postman
POST
http://jiratest.kamstrup.dk/rest/api/2/issue/oms-2149/attachments HTTP/1.1
X-Atlassian-Token: no-check
Content-Type: multipart/form-data; boundary=--------------------------236638228057324148168041
cache-control: no-cache
Postman-Token: 57474a56-9350-47db-b840-b6811b74139c
Authorization: Basic bmV1cm9uLXRlc3Q6S2Ftc3RydXAyMDE5
User-Agent: PostmanRuntime/7.6.0
Accept: */*
Host: jiratest.kamstrup.dk
cookie: JSESSIONID=D13E363BCE1C13A72F03228E87C7CE3E; atlassian.xsrf.token=BFA9-9KJP-X2G3-LK1H_d22a0d2bf4dba9a4546f546b9fcb2acd790e7dd8_lin
accept-encoding: gzip, deflate
content-length: 210
Connection: keep-alive
----------------------------236638228057324148168041
Content-Disposition: form-data; name="file"; filename="test.txt"
Content-Type: text/plain
test
----------------------------236638228057324148168041--
I've tried reproducing the same through the Http Client utility (using Form Body as Body option), but it doesn't seem to support additional body headers (Content-Type), as well as additional form parameters (filename="")
POST
http://jiratest.kamstrup.dk/rest/api/2/issue/oms-2149/attachments HTTP/1.1
X-Atlassian-Token: no-check
Content-Type: multipart/form-data; boundary=----------bec4bc1b5e48429bafd3aa48a31fc7c4
Authorization: Basic bmV1cm9uLXRlc3Q6S2Ftc3RydXAyMDE5
Host: jiratest.kamstrup.dk
Content-Length: 277
Expect: 100-continue
Accept-Encoding: gzip, deflate
------------bec4bc1b5e48429bafd3aa48a31fc7c4
Content-Disposition: form-data; name="file"
This is a test.
------------bec4bc1b5e48429bafd3aa48a31fc7c4--
What do the key/value pair represent in the client utility? How should it be configured?
Alternatively, can I create a REST request manually, any suggestion for this?
Thanks
Fabrizio