Skip to content

Commit

Permalink
Support paths in AAS client.
Browse files Browse the repository at this point in the history
  • Loading branch information
kenwenzel committed Jan 11, 2024
1 parent 762e749 commit 59f86ff
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ public IExtendedIterator<Record> submodel(String id, boolean encodeBase64) throw
protected IExtendedIterator<Record> query(String endpoint, String path, Map<String, String> params, String cursor)
throws URISyntaxException, IOException {
URIBuilder uriBuilder = new URIBuilder(endpoint);
uriBuilder.setPath(path);
uriBuilder.setPath(Optional.ofNullable(uriBuilder.getPath())
.map(p -> p.replaceFirst("/?$", "/"))
.orElse("") + path);
if (params != null) {
params.forEach((k, v) -> uriBuilder.setParameter(k, v));
}
Expand Down

0 comments on commit 59f86ff

Please sign in to comment.