4b0082 Posted December 20, 2014 Posted December 20, 2014 $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 $oHTTP.Send($sPD) ; 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?
Danyfirex Posted January 1, 2015 Posted January 1, 2015 use some HTTP debbugger and look the correct way to do it. Saludos Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now