Table of Contents

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.

Usage

WinHTTP := ComObjCreate("WinHttp.WinHttpRequest.5.1")
WinHTTP.Open(<Method>, <URL>, false)
WinHTTP.Send(<BodyData>)

Examples

Fetch current AHK_L version number

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