uritemplate
uritemplate copied to clipboard
Default values
I noticed the implementation allows specifying default values in the template, which is cool, but is not supported by the RFC.
Maybe this feature should be added to the RFC?
Can you share what you mean by "specifying default values"? I can't figure out what you're talking about. I only wrote things according to the specification.
Sure, you can have a template: “{foo=bar}” and if the caller does not provide a value for ‘foo’, the result is “bar”. Maybe I’m missing something but I don’t find that in the RFC.
Huh, now I'm wondering why I implemented that nearly 7 years ago.
Looks like it was in an earlier draft: https://tools.ietf.org/html/draft-gregorio-uritemplate-02#section-3.2 and removed in version 06.
Don't get me wrong, I'm not proposing you remove the feature, I'd rather see a new version of the RFC that brings this feature back. I'm just pointing it out to raise the disconnect.
Well I don't have control over that and have little enthusiasm to interact with the IETF WG over this.