parseWebDavOptions function

WebDavOptions parseWebDavOptions(
  1. Map<String, String> headers
)

Parses the response headers from a options request.

Implementation

WebDavOptions parseWebDavOptions(Map<String, String> headers) {
  final davCapabilities = headers['dav'];
  final davSearchCapabilities = headers['dasl'];

  return WebDavOptions(
    davCapabilities?.split(',').map((e) => e.trim()).where((e) => e.isNotEmpty).toSet(),
    davSearchCapabilities?.split(',').map((e) => e.trim()).where((e) => e.isNotEmpty).toSet(),
  );
}