Help with winhttprequest object
How Do I Post The Data with
winhttprequest object
Code:
strData = "MY POST DATA"
strPacket = "POST " & postServer3 & " HTTP/1.1" & vbCrLf
strPacket = strPacket & "Host: www.server.com" & vbCrLf
strPacket = strPacket & "User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9) Gecko/2008052906 Firefox/3.0" & vbCrLf
strPacket = strPacket & "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" & vbCrLf
strPacket = strPacket & "Accept-Language: en-us,en;q=0.5" & vbCrLf
strPacket = strPacket & "Keep-Alive: 300" & vbCrLf
strPacket = strPacket & "Connection: keep-alive" & vbCrLf
strPacket = strPacket & "Content-Type: application/x-www-form-urlencoded" & vbCrLf
strPacket = strPacket & "Content-Length: " & Len(strData) & vbCrLf & vbCrLf
SSLSock.SendSSL strPacket & strData
plz help its urgent....... need to complete project!!
Re: Help with winhttprequest object
WinHttpRequest Object describes the use of this class.
Re: Help with winhttprequest object
can any 1 show me 1 post example plz
or plz tell am i going ryt ??
Code:
sTrData = "my post data"
Dim HttpReq As Object
' Create the WinHTTPRequest ActiveX Object.
Set HttpReq = New WinHttpRequest
' Switch the mouse pointer to an hourglass while busy.
' Open an HTTP connection.
HttpReq.Open "POST", "https://server.com" & postServer, False
'HttpReq.SetRequestHeader "Content-Length", CStr(Len(sTrData))
'Set request header.
' Send the HTTP Request.
HttpReq.sEnd sTrData
' Get all response headers.
Text1.Text = HttpReq.ResponseText
Re: Help with winhttprequest object
no 1 to help ?
i get the same ..... page after submission !!