HTTP Post request

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How can i use system.net or any other namespace provided by .net framework to send a HTTP Post request
I was using Winhttp object in VB6, now i want to use the functionality provided by .net framework

Razbir
 
Use webrequest and webresponse

dim req as webreques
dim rsp as webrespons

req = WebRequest.Create("someurl.asp"

req.Method = "POST

req.ContentType = "text/xml" or "application/x-www-form-urlencoded" <-- Use what ever your planning to sen

'send some info here using the req.GetRequestream metho

rsp = req.getrespons

'retrieve info from the response using rsp.GetResponseStream metho
 
Back
Top