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 WithEvents wodHttp As wodHttpDLXCom Private Sub Form_Load() ' Initialize the component Set wodHttp = New wodHttpDLXCom ' 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 End Sub ' When component is done executing, Done event is triggered. We can ' check response here Private Sub wodHttp_Done(ByVal ErrorCode As Long, ByVal ErrorText As String) ' If no Error occured, ErrorCode will return 0 If ErrorCode = 0 Then MsgBox wodHttp.Response.Body Else MsgBox ErrorText End If End Sub VB.Net code
Dim WithEvents 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 ' 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() End Sub ' When component is done executing, Done event is triggered. We can ' check response here Private Sub wodHttp_Done(ByVal ErrorCode As Integer, ByVal ErrorText As String) Handles wodHttp.Done ' If no Error occured, ErrorCode will return 0 If ErrorCode = 0 Then MsgBox(wodHttp.Response.Body) Else MsgBox(ErrorText) End If End Sub C# code
private wodHttpDLXComLib.wodHttpDLXComClass wodHttp; private void Form1_Load(object sender, EventArgs e) { // Initialize the component and declare Done event wodHttp = new wodHttpDLXComLib.wodHttpDLXComClass(); wodHttp.Done += new wodHttpDLXComLib._IwodHttpDLXComEvents_DoneEventHandler(wodHttp_Done); // 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(wodHttp.URL); } // When component is done executing, Done event is triggered. We can // check response here void wodHttp_Done(int ErrorCode, string ErrorText) { if(ErrorCode == 0) { MessageBox.Show(wodHttp.Response.Body); } else { MessageBox.Show(ErrorText); } } |