Lets say, we have a template = https://someUrl{?someQuery:Param} where the we have a query param which has colon in it = "someQuery:Param"
If i try to expand this via :
Map<String, Object> templateParams = new HashMap<>();
templateParams.put("someQuery:Param", "hello");
UriTemplate
.fromTemplate("https://someUrl{?someQuery:Param}").expand(templateParams);
It fails with -
com.damnhandy.uri.template.MalformedUriTemplateException: The prefix value for repo was not a number
at com.damnhandy.uri.template.Expression.parseRawExpression(Expression.java:329)
at com.damnhandy.uri.template.Expression.<init>(Expression.java:268)
at com.damnhandy.uri.template.impl.UriTemplateParser.endExpression(UriTemplateParser.java:225)
at com.damnhandy.uri.template.impl.UriTemplateParser.scan(UriTemplateParser.java:89)
at com.damnhandy.uri.template.UriTemplate.parseTemplateString(UriTemplate.java:302)
at com.damnhandy.uri.template.UriTemplate.<init>(UriTemplate.java:154)
at com.damnhandy.uri.template.UriTemplate.fromTemplate(UriTemplate.java:223)
Is there a way to escape colon (:) if query param contains it ?
cc @damnhandy
Lets say, we have a template = https://someUrl{?someQuery:Param} where the we have a query param which has colon in it = "someQuery:Param" If i try to expand this via :
It fails with - com.damnhandy.uri.template.MalformedUriTemplateException: The prefix value for repo was not a number
Is there a way to escape colon (:) if query param contains it ? cc @damnhandy