WebDavClient constructor

WebDavClient(
  1. Uri baseURL, {
  2. Client? httpClient,
  3. List<DynamiteAuthentication>? authentications,
  4. bool useCSRFClient = true,
})

Creates a new WebDavClient.

The httpClient parameter specifies whether requests should attach a CSRF-Token to sent requests. Until Nextcloud 30 this is required to work around an authorization bug triggered, when cookies are also sent.

Implementation

WebDavClient(
  super.baseURL, {
  http.Client? httpClient,
  super.authentications,
  bool useCSRFClient = true,
}) : super(
        httpClient: useCSRFClient
            ? WebDavCSRFClient(
                baseURL,
                httpClient: httpClient,
              )
            : httpClient,
      );