WinHttpRequest save as zip file
Posted: 08 Aug 2020, 09:40
Hi
wants to download a Zip file via WinHttpRequest, but only gets Zip headers (";PK") saved
How can I save as a Zip file?
Thanks
myCode:
wants to download a Zip file via WinHttpRequest, but only gets Zip headers (";PK") saved
How can I save as a Zip file?
Thanks
myCode:
Code: Select all
myUrl := "https://www.test.com/stocks"
myAuth := "Basic ...."
oHTTP := ComObjCreate("WinHttp.WinHttpRequest.5.1")
oHTTP.Open("GET", myUrl , true)
oHTTP.SetRequestHeader("Authorization" , myAuth)
oHTTP.Send()
oHTTP.WaitForResponse()
myZipFile := oHTTP.ResponseText()
FileAppend, %myZIpFile%, zip.zip