Question:
Hi,
I am using this example :
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Chilkat_v9_5_0_TLB;
...
procedure TForm1.Button1Click(Sender: TObject); var http: TChilkatHttp; success: Integer; localFilePath: WideString;
begin http := TChilkatHttp.Create(Self);
// Any string unlocks the component for the 1st 30-days. success := http.UnlockComponent('Anything for 30-day trial'); if (success <> 1) then begin Memo1.Lines.Add(http.LastErrorText); Exit; end;
// Download a .zip localFilePath := '/temp/hamlet.zip'; success := http.Download('http://www.chilkatsoft.com/hamlet.zip',localFilePath); if (success <> 1) then begin Memo1.Lines.Add(http.LastErrorText); Exit; end;
// Download an XML file: // To download using SSL/TLS, simply use "https://" in the URL. localFilePath := '/temp/hamlet.xml'; success := http.Download('https://www.chilkatsoft.com/hamlet.xml',localFilePath); if (success <> 1) then begin Memo1.Lines.Add(http.LastErrorText); Exit; end;
Memo1.Lines.Add('OK!');
end;
But is it also posible to send POST-value's direct in the download request (optional in JSON format)? Looking at the POST examples, i can find a solution to combinate it.
Groetjes, Fonzie