3

我正在寻找构建以下类型的 URI: https ://example.com/index.html#db/report/csv?token=4cec23a8a07b63c1ed74&time=1473951700000&name=GA

但我正在尝试产生不正确的结果:

UriBuilder.fromUri("https://example.com").path("index.html#db/report/csv").queryParam("token", "4cec23a8a07b63c1ed74").queryParam("time", "1473951700000").queryParam("name", "GA").build();

以上是对 # 进行编码并导致

https://example.com/index.html%23db/report/csv?token=4cec23a8a07b63c1ed74&time=1473951700000&name=GA

如何不编码 # 并仍然获得所需的 Url。

4

0 回答 0