A REST service I'm working on is sending HATEOAS links back to its AngularJS client. For a few of them, we can't provide the full URL (for lack of information), just a URI Template. We want to follow RFC 6570 (section 3.2.7, "Path-Style Parameter Expansion") to do that. The syntax is {;varName,foo}
which the client is supposed to expand to ;varName=bar;foo=baz
A colleague made me aware of AngularJS's documentation for $resource
, where a syntax with colons is used: :varName
I suppose the equivalent for that would be section 3.2.2 in that RFC (simple string expansion): {varName}
, e.g. example.com/order/{orderId}/
would be example.com/order/:orderId/
in that syntax, and expand to .../order/123/
So, first of all, could the colon syntax be used for matrix parameter templates?
Secondly, is that colon syntax defined in a standard/rfc, or is it AngularJS-specific? (The service is supposed to be client-agnostic.)
Last but not least, does AngularJS support RFC6570 out of the box?
P.S.: This is a cross-post from the Angualr-JS mailing list...