Procedure EventOnStart;
begin
ClearSelectionList('Lieferant');
RawHeaders := '';
HTTPResult := HTTPGet('http://localhost:4040/pub/supply/lieferanten.txt',RawHeaders) + crlf;
if pos('200 (OK)',uppercase(RawHeaders)) > 0 then
begin
while pos(crlf,HTTPResult) > 0 do
begin
Value := trim(copy(HTTPResult,1,pos(lfcr,HTTPResult)-1));
delete(HTTPResult,1,pos(lfcr,HTTPResult)+1);
AddToSelectionList('Lieferant',Value,'');
end;
end;
end;