openUrl<P extends WebDavRequestParam> method
Future<WebDavStdRequest<P> >
openUrl<P extends WebDavRequestParam>({
- required WebDavMethod method,
- required Uri url,
- required P param,
- ResponseBodyDecoderManager? responseBodyDecoders,
- 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));