Delphi ActiveX
Delphi ActiveX
Example: Http.GetRequestHeader method
Demonstrates theGetRequestHeader method.
Chilkat Delphi ActiveX Downloads
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Chilkat_TLB;
...
procedure TForm1.Button1Click(Sender: TObject);
var
success: Integer;
http: TChilkatHttp;
hdr1: WideString;
hdr2: WideString;
begin
success := 0;
http := TChilkatHttp.Create(Self);
hdr1 := 'X-CSRF-Token';
hdr2 := 'X-Example';
http.SetRequestHeader(hdr1,'Fetch');
http.SetRequestHeader(hdr2,'123ABC');
Memo1.Lines.Add(hdr1 + ': ' + http.GetRequestHeader(hdr1));
Memo1.Lines.Add(hdr2 + ': ' + http.GetRequestHeader(hdr2));
// Output:
// X-CSRF-Token: Fetch
// X-Example: 123ABC
end;