Talk:REST/@comment-203.176.130.117-20130123045032

From Request Tracker Wiki
Jump to navigation Jump to search


--      Dot net comment

      Dim ticketNumber As String = "8338"

      Dim userName As String = "sdsd"

      Dim password As String = "asdsadasdad"

      Dim URL As String = "http://yourdomain/rt/REST/1.0/ticket/" + ticketNumber + "/comment?user=" + userName + "&pass=" + password

      Dim Client As New System.Net.WebClient

      Dim postString As String

      postString = "content=Text: RT Test2  dd 1" + vbLf + "Action: Comment"

      Dim postBytes As Byte() = System.Text.Encoding.ASCII.GetBytes(postString)

      Dim responseArray As Byte() = Client.UploadData(URL, "POST", postBytes)

      TextBox1.Text = System.Text.Encoding.ASCII.GetString(responseArray)