Set whether do encode slash {@literal /} characters when resolving this template. @param decodeSlash if slash literals should not be encoded. @return a RequestTemplate for chaining.
(boolean decodeSlash)
| 337 | * @return a RequestTemplate for chaining. |
| 338 | */ |
| 339 | public RequestTemplate decodeSlash(boolean decodeSlash) { |
| 340 | this.decodeSlash = decodeSlash; |
| 341 | this.uriTemplate = |
| 342 | UriTemplate.create(this.uriTemplate.toString(), !this.decodeSlash, this.charset); |
| 343 | if (!this.queries.isEmpty()) { |
| 344 | this.queries.replaceAll( |
| 345 | (key, queryTemplate) -> |
| 346 | QueryTemplate.create( |
| 347 | /* replace the current template with new ones honoring the decode value */ |
| 348 | queryTemplate.getName(), |
| 349 | queryTemplate.getValues(), |
| 350 | charset, |
| 351 | collectionFormat, |
| 352 | decodeSlash)); |
| 353 | } |
| 354 | return this; |
| 355 | } |
| 356 | |
| 357 | /** |
| 358 | * If slash {@literal /} characters are not encoded when resolving. |