All wodCrypt (12) wodSSH (10) wodSFTP (23) wodSSHServer (1) wodSSHTunnel (11) wodSSHpackage wodSFTPdll wodSSH.NET (10) wodSFTP.NET (24) wodFtpDLX.NET (22) wodWebServer.NET (10) wodAppUpdate (13) wodHttpDLX (8) wodFtpDLX (22) wodTelnetDLX wodFTPServer (3) wodWebServer (10) wodVPN wodXMPP (13) | All ** [Visual Basic] ** [C#] ** [VB.NET] ** HTTP Post
VB code
Dim wodHttp As wodHttpDLXCom Private Sub Form_Load() ' Initialize the component Set wodHttp = New wodHttpDLXCom On Error Resume Next ' This makes component to perform synchronously wodHttp.Blocking = True ' Now, let's POST data to page wodHttp.URL = "/HttpDLX/Demo/TestFormPost.asp" ' Use "joe" as both, Username and password to receive SUCCESS response wodHttp.Request.FormPost.Add "Username", "some_username" wodHttp.Request.FormPost.Add "Password", "some_password" wodHttp.Post ' If no error occured, display page body. Else, show us the error If (wodHttp.LastError = 0) Then MsgBox wodHttp.Response.Body Else MsgBox wodHttp.LastErrorText End If End Sub VB.Net code
Dim wodHttp As wodHttpDLXComLib.wodHttpDLXCom Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load ' Initialize the component wodHttp = New wodHttpDLXComLib.wodHttpDLXCom On Error Resume Next ' This makes component to perform synchronously wodHttp.Blocking = True ' Now, let's POST data to page wodHttp.URL = "/HttpDLX/Demo/TestFormPost.asp" ' Use "joe" as both, Username and password to receive SUCCESS response wodHttp.Request.FormPost.Add("Username", "some_username") wodHttp.Request.FormPost.Add("Password", "some_password") wodHttp.Post() ' If no error occured, display page body. Else, show us the error If (wodHttp.LastError = 0) Then MsgBox(wodHttp.Response.Body) Else MsgBox(wodHttp.LastErrorText) End If End Sub C# code
private wodHttpDLXComLib.wodHttpDLXComClass wodHttp; private void Form1_Load(object sender, EventArgs e) { // Initialize the component wodHttp = new wodHttpDLXComLib.wodHttpDLXComClass(); // Now, let's POST data to page wodHttp.URL = "/HttpDLX/Demo/TestFormPost.asp"; // This makes component to perform synchronously wodHttp.Blocking = true; // Now, let's POST data to page wodHttp.URL = "/HttpDLX/Demo/TestFormPost.asp"; // Use "joe" as both, Username and password to receive SUCCESS response wodHttp.Request.FormPost.Add("Username", "some_username"); wodHttp.Request.FormPost.Add("Password", "some_password"); // If no error occured, display page body. Else, show us the error try { wodHttp.Post(wodHttp.URL); MessageBox.Show(wodHttp.Response.Body); } catch (System.Exception ex) { MessageBox.Show(ex.Message); } } |