WebDAV: Initiate the connection
In all editions you can create the instance of TElWebDAVClient class in code. This includes referencing the needed library and header files and creating an instance of the class.
In .NET and VCL editions you can place the TElWebDAVClient component to the form in visual form designer in the corresponding IDE. This will add the necessary references and code declarations to the code.
TElWebDAVClient is a WebDAV client class, which uses TElHTTPSWebDAVClient class as a transport to exchange data with a server. You should create (or place to the form in .NET and VCL) an instance of TElHTTPSWebDAVClient class, perform its setup and assign it to TElWebDAVClient.HTTPSWebDAVClient property.
After that you can assign TElWebDAVClient.BaseURL property that must contain HTTP(S) URL, which points to a base WebDAV directory on a remote server. BaseURL property is used to query various server-speciifc information as well as a base collection (directory) when executing operations (like List()) which don't have a directory as a parameter. So it's important to set BaseURL before using the WebDAV client.
TElWebDAVClient cli = new TElWebDAVClient(); TElHTTPSWebDAVClient httpcli = new TElHTTPSWebDAVClient(); cli.HTTPSWebDAVClient = httpcli; cli.BaseURL = @"http://remote.com/dav_folder";
var cli : TElWebDAVClient; httpcli : TElHTTPSWebDAVClient; ... cli = TElWebDAVClient.Create(nil); httpcli = TElHTTPSWebDAVClient.Create(nil); cli.HTTPSWebDAVClient := httpcli; cli.BaseURL := 'http://remote.com/dav_folder';