wdPropfind method

Future<Response> wdPropfind(
  1. Client self,
  2. String path,
  3. bool depth,
  4. String dataStr, {
  5. CancelToken? cancelToken,
})

Implementation

Future<Response> wdPropfind(
    Client self, String path, bool depth, String dataStr,
    {CancelToken? cancelToken}) async {
  var resp = await this.req(self, 'PROPFIND', path, data: dataStr,
      optionsHandler: (options) {
    options.headers?['depth'] = depth ? '1' : '0';
    options.headers?['content-type'] = 'application/xml;charset=UTF-8';
    options.headers?['accept'] = 'application/xml,text/xml';
    options.headers?['accept-charset'] = 'utf-8';
    options.headers?['accept-encoding'] = '';
  }, cancelToken: cancelToken);

  if (resp.statusCode != 207) {
    throw newResponseError(resp);
  }

  return resp;
}