You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When there's a blank in a uri template string, the Resolve()-method crashes.
Meaning:
this template will work: "/feeds/events{?fromId}"
this template will crash when "Resolve()" is called: "/feeds/events{? fromId}"
I believe the UriTemplates implementation should either moan when constructed with such a template: "/feeds/events{? fromId}", or work correctly. But throwing an exception when "Resolve()" is called is too late.
The text was updated successfully, but these errors were encountered:
I looked into this and I don't have an ideal answer for you. Technically the spec does not allow whitespace where you have it, so by the letter of the law, it is not a valid template.
However, I don't process the template until you actually call resolve, so the error is only detected during processing. In theory I could add in a redundant call to resolve in the constructor, but then everyone pays the price of that extra resolve call.
If you need to know that a template is valid at construction time, then you could call Resolve() immediately after creating the template. There is no harm in calling Resolve() multiple times. Another possibility is to add a Verify() method that returns an error message if it finds anything. That would avoid having to do try catch blocks around the Resolve check.
When there's a blank in a uri template string, the Resolve()-method crashes.
Meaning:
I believe the UriTemplates implementation should either moan when constructed with such a template: "/feeds/events{? fromId}", or work correctly. But throwing an exception when "Resolve()" is called is too late.
The text was updated successfully, but these errors were encountered: