Browse Source

fix(dynamite_runtime): Skip empty query parameters

Signed-off-by: jld3103 <jld3103yt@gmail.com>
pull/902/head
jld3103 1 year ago
parent
commit
fbdc9866a6
No known key found for this signature in database
GPG Key ID: 9062417B9E8EB7B3
  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