Created
December 16, 2013 22:15
-
-
Save ycaroafonso/7995426 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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