Talk:REST/@comment-203.176.130.117-20130123045032: Difference between revisions

From Request Tracker Wiki
Jump to navigation Jump to search
(Created page with " --      ''Dot net comment''       Dim ticketNumber As String = "8338"       Dim userName As String = "sdsd"       Dim password As String = "asdsadasdad"   ...")
 
m (1 revision imported)
 
(No difference)

Latest revision as of 15:52, 6 April 2016


--      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)