convert method

Converts input and returns the result of the conversion.

Implementation

@override
WebDavStdResResultView convert(ResponseResultParserParam input) {
  final redirect = input.headers.value(HttpHeaders.locationHeader);
  final doc = (input.headers.contentType?.isXml ?? false)
      ? XmlDocument.parse(input.data)
      : null;
  return WebDavStdResponseResult()
    ..add(convertResource(doc?.rootElement,
        path: input.path,
        status: input.status,
        redirect: redirect != null ? Uri.tryParse(redirect) : null));
}