guides:com:winhttp.winhttprequest

This is an old revision of the document!


WinHttp.WinHttpRequest.5.1

As documented on MSDN.

The WinHttp.WinHttpRequest.5.1 object (referred to as "WinHttp") can be used to make complex HTTP requests, including different HTTP methods (GET, SET, …) and arbitrary headers (Context-Type, …) along with any body data.

WinHTTP := ComObjCreate("WinHttp.WinHttpRequest.5.1")
WinHTTP.Open(<Method>, <URL>, false)
WinHTTP.Send(<BodyData>)
WinHTTP := ComObjCreate("WinHttp.WinHttpRequest.5.1")
WinHTTP.Open("GET", "https://www.autohotkey.com/download/1.1/version.txt", false)
WinHTTP.Send()
 
MsgBox, % "AHK 1.1 is currently on version: " WinHTTP.ResponseText