mkcol method

Future<StreamedResponse> mkcol(
  1. PathUri path, {
  2. WebDavProp? set,
})

Creates a collection at path.

The props in set will be added.

See:

Implementation

Future<http.StreamedResponse> mkcol(
  PathUri path, {
  WebDavProp? set,
}) async {
  final request = mkcol_Request(
    path,
    set: set,
  );

  final streamedResponse = await httpClient.send(request);
  if (streamedResponse.statusCode != 201) {
    final response = await http.Response.fromStream(streamedResponse);
    throw DynamiteStatusCodeException(response);
  }

  return streamedResponse;
}