Closed
Description
When calling the SdkHttpFullRequest builder using the URI default method, and query parameters already in your URI are removed.
Expected Behavior
Existing query parameters in the URI should be kept.
Current Behavior
default Builder uri(URI uri) {
return this.protocol(uri.getScheme())
.host(uri.getHost())
.port(uri.getPort())
.encodedPath(SdkHttpUtils.appendUri(uri.getRawPath(), encodedPath()));
Calling getRawPath() returns only the path without parameters, and encodedPath() is empty if this is your first builder call.
Steps to Reproduce
Create a URI with query parameters.
Call the builder.
Possible Solution
call URI.getQuery, create a map, then call rawQueryParameters
Context
We are calling a callback url, provided already fully formed. Without this we need to tear apart the input url and put it back together to call it.
Your Environment
- AWS Java SDK version used: 2.14.15
- JDK version used: 11
- Operating System and version: AWS Lambda