Webbrowser HTTP POST


/ Published in: Visual Basic
Save to your folder(s)



Copy this code and paste it in your HTML
  1. Sub Command1_Click()
  2. Dim URL As String
  3. Dim Flags As Long
  4. Dim TargetFrame As String
  5. Dim PostData() As Byte
  6. Dim Headers As String
  7.  
  8. URL = "http://tuservidor" ' una url que acepte HTTP PoST
  9. Flags = 0
  10. TargetFrame = ""
  11.  
  12. PostData = "Información que se enviara al host"
  13.  
  14. PostData = StrConv(PostData, vbFromUnicode)
  15.  
  16. Headers = "Content-Type: application/x-www-form-urlencoded" & _
  17. vbCrlf
  18. WebBrowser1.Navigate URL, Flags, TargetFrame, PostData, Headers
  19. End Sub

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.