Closed franzliedke closed 7 years ago
3.2.1. Variable Expansion
A variable that is undefined (Section 2.3) has no value and is
ignored by the expansion process. If all of the variables in an
expression are undefined, then the expression's expansion is the
empty string.
URI templates [RFC 6570] do not have mandatory expressions. I do not see much we can do here. One has to check for errors (410, 404, 5xx) and expected content (Accept, Content-Type, Format, ...) anyway.
Okay, good point then.
Example:
This will result in
http://host/articles
being requested - resulting in errors like:Even though this usually results in an exception that will sooner or later lead to this realization, maybe unresolvable template parameters like
{id}
in the example should throw an exception instead?