Skip to content

Commit

Permalink
add method to encode path parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
jenschude committed Aug 6, 2024
1 parent cabe1e5 commit 5fdde6c
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -402,4 +402,13 @@ public ApiHttpResponse<byte[]> sendBlocking() {
public ApiHttpResponse<byte[]> sendBlocking(final Duration timeout) {
return apiHttpClient.sendBlocking(this, timeout);
}

protected static <V> String encodePathParam(V pathParameter) {
try {
return URLEncoder.encode(pathParameter.toString(), StandardCharsets.UTF_8.toString());
}
catch (UnsupportedEncodingException e) {
throw new EncodingException(e);
}
}
}

0 comments on commit 5fdde6c

Please sign in to comment.