Browse Source

fix(nextcloud): Re-use HttpClient in WebDAV requests

Signed-off-by: jld3103 <jld3103yt@gmail.com>
pull/1105/head
jld3103 1 year ago
parent
commit
9d8aaeffdd
No known key found for this signature in database
GPG Key ID: 9062417B9E8EB7B3
  1. 2
      packages/nextcloud/lib/src/webdav/client.dart

2
packages/nextcloud/lib/src/webdav/client.dart

@ -29,7 +29,7 @@ class WebDavClient {
}) async { }) async {
assert(dataStream == null || data == null, 'Only one of dataStream or data can be specified.'); assert(dataStream == null || data == null, 'Only one of dataStream or data can be specified.');
final request = await HttpClient().openUrl(method, url) final request = await rootClient.httpClient.openUrl(method, url)
..persistentConnection = true; ..persistentConnection = true;
for (final header in { for (final header in {
HttpHeaders.contentTypeHeader: 'application/xml', HttpHeaders.contentTypeHeader: 'application/xml',

Loading…
Cancel
Save