Skip to content

Commit

Permalink
Merge pull request #89 from jopmiddelkamp/feature/allow-server-url-wi…
Browse files Browse the repository at this point in the history
…th-segement

Updated the request builder to maintain the original path and query
  • Loading branch information
christian-rogobete authored Mar 27, 2024
2 parents aa5cb3d + 55bb556 commit 2dc4295
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions lib/src/requests/request_builder.dart
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,19 @@ abstract class RequestBuilder {

if (_segments.length > 0) {
build = build.replace(
pathSegments: _segments,
pathSegments: [
...build.pathSegments,
..._segments,
],
);
}
if (queryParameters.length > 0) {
build = build.replace(queryParameters: queryParameters);
build = build.replace(
queryParameters: {
...build.queryParameters,
...queryParameters,
},
);
}

return build;
Expand Down

0 comments on commit 2dc4295

Please sign in to comment.