openUrl<P extends WebDavRequestParam> method

  1. @override
Future<WebDavStdRequest<P>> openUrl<P extends WebDavRequestParam>({
  1. required WebDavMethod method,
  2. required Uri url,
  3. required P param,
  4. ResponseBodyDecoderManager? responseBodyDecoders,
  5. ResponseResultParser<WebDavStdResResultView>? responseResultParser,
})
override

Opens a WebDAV connection.

Example:

client.openUrl(
  method: WebDavMethod.propupdate,
  url: Url.parse("http://example.com"),
  param: ProppatchRequestParam(
    ops: [
      ProppatchRequestProp.set(
        name: "author",
        namespace: "CUSTOM:",
        value: ProppatchRequestPropBaseValue("zigzag"))
    ]
  ),
).then((request) => request.close())
 .then((response) => response.parse())
 .then((result) => print(result?.toDebugString()));

Implementation

@override
Future<WebDavStdRequest<P>> openUrl<P extends WebDavRequestParam>({
  required WebDavMethod method,
  required Uri url,
  required P param,
  ResponseBodyDecoderManager? responseBodyDecoders,
  ResponseResultParser<WebDavStdResResultView>? responseResultParser,
}) =>
    client.openUrl(method.name, url).then((request) => WebDavStdRequest<P>(
        request: request,
        param: param,
        responseBodyDecoders: responseBodyDecoders,
        responseResultParser: responseResultParser));