fpc/packages/fcl-base/examples/testur.pp
peter 46f999c582 * fpmake support
git-svn-id: trunk@9899 -
2008-01-24 21:50:42 +00:00

41 lines
900 B
ObjectPascal

{$mode objfpc}
program testur;
uses resolve;
var
U : TURIParser;
Procedure DumpURI(U : TURIParser);
begin
With U do
begin
Writeln('Protocol :',Protocol);
Writeln('Username :',Username);
Writeln('Password :',Password);
Writeln('Host :',Host );
Writeln('Port :',Port );
Writeln('Path :',Path );
Writeln('Document :',Document);
Writeln('Params :',Params );
Writeln('Bookmark :',Bookmark);
Writeln('URI :',URI);
end;
end;
begin
U:=TURIParser.Create(Nil);
Try
Writeln('Parsing : http://www.freepascal.org:80/bugs/db.php?ID=20');
U.ParseURI('http://www.freepascal.org:80/bugs/db.php?ID=20');
DumpURI(U);
U.Active:=True;
Writeln('Setting URI : http://www.lazarus.freepascal.org/main.php');
U.URI:='http://www.lazarus.freepascal.org/main.php';
DumpUri(U);
finally
U.Free;
end;
end.