Zdravim,
potřeboval bych poradit, jak mám postnout přílohy do JIRA, pomocí JIRA REST API. Konkrétně tento problém:
POST Add one or more attachments to an issue. This resource expects a multipart post. The media-type multipart/form-data is defined in RFC 1867. Most client libraries have classes that make dealing with multipart posts simple. For instance, in Java the Apache HTTP Components library provides a MultiPartEntity that makes it simple to submit a multipart POST. In order to protect against XSRF attacks, because this method accepts multipart/form-data, it has XSRF protection on it. This means you must submit a header of X-Atlassian-Token: nocheck with the request, otherwise it will be blocked. The name of the multipart/form-data parameter that contains attachments must be "file" A simple example to upload a file called "myfile.txt" to issue REST-123: curl -D- -u admin:admin -X POST -H "X-Atlassian-Token: nocheck" -F "file=@myfile.txt" ....http://myhost/rest/api/2/issue/TEST-123/attachments......
Nevím si rady s tím, kam mám co vepsat a jak udělal toto: (pomocí HttpWebRequest)
curl -D- -u admin:admin -X POST -H "X-Atlassian-Token: nocheck" -F "file=@myfile.txt
Co jsem koukal, tak se jedná o nějaký multipart/form-data, ale to nevím, jak se posílají....
Děkuji za Vaše odpovědi...