0
我已成功创建Jira Issue,现在想要使用以下内容添加附件:api/2/issue/{issueIdOrKey}/attachments使用:api/2/issue/{issueIdOrKey} /附件添加附件
我的下面的VB代码不会工作,任何建议,因为这对我来说是新的,谢谢。我得到的错误是:HTTP状态500 - 错误解析的Content-Type
子JIRA_PostAttachment()
昏暗PHTML作为字符串 昏暗oHttp作为对象 昏暗strResponse作为字符串
PHTML = “https://jira.ae.sda.corp.test.com/rest/api/2/issue/IS-163/attachments” SVAR = “” “文件=” “: ”“ C:\用户\ c776469 \ FORM.msg” “”
Set oHttp = CreateObject("Microsoft.XMLHTTP")
Call oHttp.Open("POST", pHtml, False)
'oHttp.SetRequestHeader "Content-Type", "application/json"
oHttp.SetRequestHeader "Content-Type", "multipart/form-data;Charset=UTF-8; boundary="
'oHttp.SetRequestHeader "Accept", "application/json"
oHttp.SetRequestHeader "X-Atlassian-Token", "no-check"
oHttp.SetRequestHeader "Authorization", "Basic Yzc4NjQ3OTpHaWxpdDIwMTY/"
Call oHttp.Send(sVar)
strResponse = oHttp.ResponseText
MsgBox strResponse
Set oHttp = Nothing
结束子