Is there any way to send HTTP request using (pure) Inno Setup?
isxdl.dll isn't an option, because it creates window of the "download".
Also I would like to avoid using curl.
This extension can download without a UI; http://www.sherlocksoftware.org/page.php?id=50 (Via ITD_DownloadFiles
)
Use WinHttpRequest
object:
var
WinHttpReq: Variant;
begin
WinHttpReq := CreateOleObject('WinHttp.WinHttpRequest.5.1');
WinHttpReq.Open('GET', 'https://www.example.com/', False);
WinHttpReq.Send('');
if WinHttpReq.Status <> 200 then
begin
Log(Format('HTTP error: %d %s', [Integer(WinHttpReq.Status), WinHttpReq.StatusText]));
end
else
begin
Log(Format('HTTP Response: %s', [WinHttpReq.ResponseText]));
end;
end;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With