Trailing slash on relation key URLs?

Thomas Sødring thomas.sodring at hioa.no
Mon Feb 6 15:06:21 CET 2017


On 02/06/2017 12:05 PM, Petter Reinholdtsen wrote:
> As far as I can tell from the specification (see for example page 57),
> the URLs used in the _links->rel fields should contain a trailing slash.
> At least that is the case in the relation key listings.  The text on the
> other hand uses both. And when visiting <URL: http://n5test.kxml.no/api/ >
> the trailing slash is missing.  Are both style URLs allowed?  If so,
> why?
I guess both are allowed. But I think we can try to be consistent in the
core with this. I haven't made sure I am, but with the 0.2 release, we
can check this.

>   Did I miss something in the specification?  Seem stupid to allow
> both when locking it to one of the forms would make implementation
> simpler.
No, I doubt you missed anything. The standard does come across as a
work-in-progress!
>
> I was planning to verify the content of the rel attribute, but it
> suddently become a bit harder than expected when I do not really know
> the form of the url.
>
I have done some work with the Hateoas controllers/handler, so let me
try and fix the mistakes you found (unless you really really want to)

 - Tom


More information about the nikita-noark mailing list