1

I'm using a third party tool by the name of DwinsHs for Inno Setup.

This third party tool provides me the capability for downloading files as part of the installation.

I want to send an HTTPS request to remote server and I would like to pass an apikey to the header of the request but it returns error 401.

This is the code:

[ISPP]
#define fileURL "https://myserver.xom?apikey=XXXX-XXXX-XXXX-XXXX"

[Code]
Source: "<path_to_my_file>"; \
  DestDir: "{app}"; \
  Flags: external deleteafterinstall; \
  Check: DwinsHs_Check( ExpandConstant('<path_to_my_file>'), '{#fileURL}', 'mySetup', 'Get', 0, 0)
Martin Prikryl
  • 188,800
  • 56
  • 490
  • 992
Carlinto
  • 33
  • 5

1 Answers1

1

I found the solution;

So, keep the url without ?apkikey=...

[ISPP]
#define fileURL "https://myserver.xom"

And adding the apikey in the header by editing const HTTP_HEADER in dwinshs.iss:

  HTTP_HEADER = 'apikey: xxxx-xxxx-xxxx-xxxx';
Martin Prikryl
  • 188,800
  • 56
  • 490
  • 992
Carlinto
  • 33
  • 5