Results 1 to 4 of 4

Thread: Help with winhttprequest object

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Aug 2008
    Posts
    84

    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!!

  2. #2
    PowerPoster dilettante's Avatar
    Join Date
    Feb 2006
    Posts
    24,487

    Re: Help with winhttprequest object

    WinHttpRequest Object describes the use of this class.

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Aug 2008
    Posts
    84

    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

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Aug 2008
    Posts
    84

    Re: Help with winhttprequest object

    no 1 to help ?

    i get the same ..... page after submission !!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width