0

I'm looking for a Java alternative to http_build_query PHP method https://www.php.net/manual/en/function.http-build-query.php.

<?php
$jsonContent = array("url" => "https://anydomain.com", "params" => "test", "timestamp" => "123");
echo http_build_query($jsonContent, '', '&', PHP_QUERY_RFC3986);
?>

where output is: url=https%3A%2F%2Fanydomain.com¶ms=test×tamp=123

Please note that completely different output would be with & since I think the markdown parser is replacing &para with ¶ and &time with ×:

echo http_build_query($jsonContent, '', '&amp;', PHP_QUERY_RFC3986);

but unfortunately that's not what I'm looking for.

user994612
  • 35
  • 5

0 Answers0