Talk:REST/@comment-203.176.130.117-20130123045032

From Request Tracker Wiki
Revision as of 23:50, 22 January 2013 by 203.176.130.117 (talk) (Created page with " --      ''Dot net comment''       Dim ticketNumber As String = "8338"       Dim userName As String = "sdsd"       Dim password As String = "asdsadasdad"   ...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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)