Delphi ActiveX
Delphi ActiveX
Example: Http.GetUrlPath method
Demonstrates theGetUrlPath 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;
url: WideString;
begin
success := 0;
http := TChilkatHttp.Create(Self);
url := 'https://example.com/folder/page?lang=en&sort=asc#section2';
Memo1.Lines.Add(http.GetUrlPath(url));
// Output:
// /folder/page
end;