Browse Source

Merge pull request #902 from nextcloud/fix/dynamite_runtime/skip-empty-query-parameters

fix(dynamite_runtime): Skip empty query parameters
pull/903/head
Kate 1 year ago committed by GitHub
parent
commit
37590da6da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 9
      packages/dynamite/dynamite_runtime/lib/src/dynamite_client.dart

9
packages/dynamite/dynamite_runtime/lib/src/dynamite_client.dart

@ -412,12 +412,13 @@ class DynamiteClient {
final Uint8List? body,
final Set<int>? validStatuses,
) async {
final uri = baseURL.replace(
path: '${baseURL.path}${path.path}',
queryParameters: {
final queryParameters = {
...baseURL.queryParametersAll,
...path.queryParametersAll,
},
};
final uri = baseURL.replace(
path: '${baseURL.path}${path.path}',
queryParameters: queryParameters.isNotEmpty ? queryParameters : null,
);
final request = await httpClient.openUrl(method, uri);

Loading…
Cancel
Save