propfind_Request method

Request propfind_Request(
  1. PathUri path, {
  2. WebDavPropWithoutValues? prop,
  3. WebDavDepth? depth,
})

Returns a request to retrieve the prop for the resource at path.

depth can be used to limit scope of the returned resources.

See:

Implementation

http.Request propfind_Request(
  PathUri path, {
  WebDavPropWithoutValues? prop,
  WebDavDepth? depth,
}) {
  final request = http.Request('PROPFIND', _constructUri(path))
    ..body = WebDavPropfind(prop: prop ?? const WebDavPropWithoutValues())
        .toXmlElement(namespaces: namespaces)
        .toXmlString();

  if (depth != null) {
    request.headers['Depth'] = depth.value;
  }

  _addBaseHeaders(request);
  return request;
}