-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect interpretation of the HAL RFC wrt curies #97
Comments
pull request fix created |
This is clearly a bug, thanks for suggesting a fix. |
About this issue here, why are you using a curie in the |
perhaps we should separate the two issues and I'll move the query params out of this issue. |
I think there is a misinterpretation of how curies are supposed to be used in HAL. Curies are meant to shorten the key names in a _links hash, not the actual href associated with a link in the _links hash, as well as provide a link to the human readable documentation for said link. https://tools.ietf.org/html/draft-kelly-json-hal-07#section-8.2
So actually, hyperclient shouldn't be doing any template expansion when dealing with curie syntax at all when navigating to a curied link.
When a curie is present, the href template inside the curie is how to find the documentation, not the resources. In the example above (from the spec), the resource is widgets, but the curie href refers to the documentation for wigets. |
Created pull request for that |
Fixed in #101. |
Closed via #101. |
Im having trouble with curies and what appears to be a difference in behavior in hyperclient vs hal-browser. Hyperclient is templating urls when not expected.
My server returns:
In the hal browser, the curie is just used for documentation links and it does not reformat the link URL, which is already absolute.
But in hyperclient, it is reformatting the url for the link itself as:
How do I reconcile this? Can I disable curie reformatting in hyperclient?
Reference: #64
The text was updated successfully, but these errors were encountered: