Ignore:
Timestamp:
May 4, 2016, 11:43:42 PM (9 years ago)
Author:
chronos
Message:
  • Added: Now import formats can be specified using new edit windows.
  • Added: Import source can now be downloaded and processed including download from https URLs.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormImport.pas

    r16 r22  
    4242  SImportedNewAcronyms = 'Imported %d new acronyms.';
    4343
    44 
    45 function DownloadHTTP(URL: string; Stream: TStream): Boolean;
    46 var
    47   HTTPGetResult: Boolean;
    48   HTTPSender: THTTPSend;
    49 begin
    50   Result := False;
    51   HTTPSender := THTTPSend.Create;
    52   try
    53     HTTPGetResult := HTTPSender.HTTPMethod('GET', URL);
    54     if (HTTPSender.ResultCode >= 100) and (HTTPSender.ResultCode <= 299) then begin
    55       HTTPSender.Document.SaveToStream(Stream);
    56       Result := True;
    57     end;
    58   finally
    59     HTTPSender.Free;
    60   end;
    61 end;
    6244
    6345{ TFormImport }
Note: See TracChangeset for help on using the changeset viewer.