3 ms·
> Doing more modern tasks like HTTP requests are not included, and adding the plugin for it is a little fiddly FWIW a package can provide components but it sho
by badsectoracula 5y ago
> Doing more modern tasks like HTTP requests are not included, and adding the plugin for it is a little fiddly
FWIW a package can provide components but it should be possible to do HTTP requests out of the box without installing anything using the FPHttpClient unit (there is also a server one too if you need it), which is part of FCL (which is available by default on Lazarus projects):
{$mode objfpc}
uses FPHttpClient;
begin
with TFPHttpClient.Create(nil) do
try
Writeln(Get('http://example.org'))
finally
Free
end
end.
Sadly the documentation[0] is not that great - in fact it doesn't exist aside from the autogenerated stubs - but it should be possible to understand what is going on by the method names and arguments.
[0] https://www.freepascal.org/daily/packages/fcl-web/fphttpclient/index.html https://www.freepascal.org/daily/packages/fcl-web/fphttpclie...