Ticket #10 (new enhancement)
Uri templates to support encoding, wildcard and default values
| Reported by: | serialseb | Owned by: | serialseb |
|---|---|---|---|
| Priority: | minor | Milestone: | 2.1 Beta 1 |
| Component: | Core - Uri Processing | Version: | 2.0 |
| Keywords: | Cc: | ||
| Time remaining: | 1d | Blocked By: | |
| Time spent: | 1d | Time planned: | 1d |
| Blocking: | #113 |
Description (last modified by serialseb) (diff)
The current UriTemplate? type supports full segment templates of the form /literal/{template}
Tempaltes should be able to be inside a segment (aka /{template}-{template2}).
The template itself should have additional semantics. It's proposed that the following be implemented: {template[:encoding][=defaultValue]}
The encoding is a system wide support of encoding and decoding of strings. Defaults to URI decoding (aka %xx are decoded on the fly as per the URI spec), with additional html form encoding (same, with the addition of the + character). See http://serialseb.blogspot.com/2008/03/httputilityurlencode-considered-harmful.html
The default value is what it says on the tin, a value that will be injected when the uri segment is missing.
