blob: 23ead4849d9fe83d59c2309d830fe9fa2352fa0e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
{$mode objfpc}
{$h+}
unit pkgfphttp;
interface
uses Classes,pkgdownload,pkgoptions,fprepos;
Type
TFPHTTPDownloader = Class(TBaseDownloader)
Protected
Procedure HTTPDownload(Const URL : String; Dest : TStream); override;
end;
implementation
uses
sysutils,fphttpclient, pkgglobals, pkgmessages;
Procedure TFPHTTPDownloader.HTTPDownload(Const URL : String; Dest : TStream);
begin
With TFPHTTPClient.Create(Nil) do
try
Get(URL,Dest);
finally
Free;
end;
end;
initialization
RegisterDownloader('FPC',TFPHTTPDownloader);
end.
|