• 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.

Basic Authorisation using WinHttp object

Hi All,

I want to connect to Jira using Jira API and get the response. I have to pass in the user id and password [login credentials] in the script.
The below is the code, I am using. I am getting Automation Error when I execute the below code.
Could anyone help me in the below.

70888

Code used is :

>>> use code - tags <<<
Code:
    Set objHTTP = CreateObject("WinHttp.WinHttpRequest.5.1")
    myuser = xxxxxx
    mypass = pwwwwd
    Url = "http://track.jira.com/rest/api/2/issue/createmeta"
    objHTTP.Send " {""username"" : """ & myuser & """, ""password"" : """ & mypass & """}"
    strResponseStatus = objHTTP.Status
    strResponseText = objHTTP.ResponseText
    strResponseText = CStr(strResponseText)
    MsgBox strResponseText
 
Last edited by a moderator:
Back
Top