Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ycaroafonso/7995426 to your computer and use it in GitHub Desktop.
Save ycaroafonso/7995426 to your computer and use it in GitHub Desktop.
Module Module1
Sub Main()
Dim ajax As New XMLHttpRequest
' Teste com GET
ajax.Open(XMLHttpRequest.EnumMethod.GET, "http://site.ycaro.net/teste.php?teste=123")
ajax.Send()
If ajax.readystate = 4 Then
If ajax.Status = 200 Then
Console.WriteLine("Teste1: " & ajax.responseText)
End If
End If
ajax.Dispose()
' Teste com POST
ajax = New XMLHttpRequest
ajax.Open(XMLHttpRequest.EnumMethod.POST, "http://site.ycaro.net/teste.php")
ajax.Send("teste=123")
If ajax.readystate = 4 Then
If ajax.Status = 200 Then
Console.WriteLine("Teste2: " & ajax.responseText)
End If
End If
ajax.Dispose()
Console.ReadLine()
End Sub
End Module
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment