Before calling JAX-RS request, encode only curly braces, which are always treated by JerseyWebTarget as template variable delimiters.