Jump to content

Recommended Posts

$sPD = 'item=1&price=2&quantity=3'

; Creating the object
$oHTTP = ObjCreate("winhttp.winhttprequest.5.1")
$oHTTP.Open("POST", "https://website.com/123456789", False)
$oHTTP.SetRequestHeader("Host", "website.com")
$oHTTP.SetRequestHeader("Connection", "keep-alive")
$oHTTP.SetRequestHeader("Accept", "*/*")
$oHTTP.SetRequestHeader("Origin", "http://website.com")
$oHTTP.SetRequestHeader("User-Agent", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.45 Safari/537.36")
$oHTTP.SetRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8")
$oHTTP.SetRequestHeader("Accept-Encoding", "gzip,deflate")
$oHTTP.SetRequestHeader("Accept-Language", "en-US,en;q=0.8,pt;q=0.6,es;q=0.4")

; Performing the Request

; Download the body response if any, and get the server status response code.
$oReceived = $oHTTP.ResponseText

MsgBox(4096, "Response code", $oReceived)

I'm trying to submit an HTTP POST to an auction site, but I'm not getting the kind of response I'm expecting. I've never used HTTP POST before, so forgive my ignorance, but is there something wrong with this code where my header isn't being submitted?

Link to post
Share on other sites
  • 2 weeks later...
Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...