1

我正在尝试构建以下 URL:

https://console.aws.amazon.com/elasticmapreduce/home?region=us-east-1#cluster-details:j-1IGU6572KT6LB

我不确定如何包含:j-1IGU6572KT6LB. 当我包含 :` 时,它会被编码。想看看能不能避免。

这就是我所拥有的:

    UriBuilder
    .fromPath("console.aws.amazon.com")
    .path("elasticmapreduce")
    .path("home")
    .queryParam("region","us-east-1")
    .fragment("cluster-details")
    .port(-1)
    .scheme("https")
4

1 回答 1

0

如果片段中的“:”被编码,在我看来是一个错误(参见 RFC 3986,第 3.5 和 3.3 节)。我建议打开一个错误报告。

OTOH,如果收件人无法处理百分比编码的冒号,那也是一个错误。

于 2019-01-19T07:20:22.193 回答