mkcol_Request method

Request mkcol_Request(
  1. PathUri path, {
  2. WebDavProp? set,
})

Returns a request to create a collection at path.

The props in set will be added.

See:

Implementation

http.Request mkcol_Request(
  PathUri path, {
  WebDavProp? set,
}) {
  final request = http.Request('MKCOL', _constructUri(path));
  if (set != null) {
    request.body = WebDavMkcol(
      set: WebDavSet(prop: set),
    ).toXmlElement(namespaces: namespaces).toXmlString();
  }

  _addBaseHeaders(request);
  return request;
}