Send HTTP Request

前端 未结 2 2060
感情败类
感情败类 2021-01-12 17:09

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 t

相关标签:
2条回答
  • 2021-01-12 17:49

    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;
    
    0 讨论(0)
  • 2021-01-12 17:52

    This extension can download without a UI; http://www.sherlocksoftware.org/page.php?id=50 (Via ITD_DownloadFiles)

    0 讨论(0)
提交回复
热议问题