• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

API Response error

Hi All,

I am using excel macro to connect to JIRA API. The response status appears as 201 created whereas the responseCode gets returned as ? ?????????????????????????????????????????? ???] . Could anyone let me know why. Below is the code:-

<<CODE>>

As many times, You've gotten a note >>> use code - tags <<<

Code:
Set objHTTP = CreateObject("WinHttp.WinHttpRequest.5.1")
UserNameP = UserPassBase64
URL = "http://jira/rest/api/2/issue/"
strPayLoad = "{" & vbCrLf & Chr(34) & "fields" & Chr(34) & ":" &
objHTTP.Open "POST", URL, False
objHTTP.setRequestHeader "Content-Type", "application/json"
objHTTP.setRequestHeader "Accept-Encoding", "gzip, deflate,br"
objHTTP.setRequestHeader "Accept-Encoding", "identity, deflate"
objHTTP.setRequestHeader "Authorization", "Basic " & UserNameP
objHTTP.setProxy 2, "proxy:80", ""
objHTTP.send (strPayLoad)
strResponseStatus = objHTTP.Status --201 is returned here correctly.
strResponseText = objHTTP.responseText
 
Last edited by a moderator:
Back
Top