-
-
Notifications
You must be signed in to change notification settings - Fork 12
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
Is it possible to hint at the HTTP method with this library? #13
Comments
I think you're looking for this: https://github.com/zfcampus/zf-hal/blob/master/src/Link/Link.php#L133 I don't know why href is ignored, but arbitrary attributes does seem like what you need. Originally posted by @TomHAnderson at zfcampus/zf-hal#136 (comment) |
That's perfect. Is it worth making a PR to add this into the When using this in tandem with the event system (I want to add my own HATEOAS links based on certain conditions), it seems to break the dynamic creation of routes... When I have this code in my module bootstrap:
These routes seem to lose their dynamic parameter generation (for the above rule I get FYI I am working in Apigility. Is this the correct way in Apigility to create dynamic HATEOAS links (there doesn't seem to be a way to do it from the Resource or Entity)? Originally posted by @danbroooks at zfcampus/zf-hal#136 (comment) |
We do it exactly like that in our project. We have a listener and then we add the methods:
Originally posted by @Wilt at zfcampus/zf-hal#136 (comment) |
I'm not sure if I've managed this before or not, thought I had but can't seem to find the configuration... Is it possible to return a HTTP method inside a link? I want to achieve something similar to Paypal's HATEOAS implementation, where the HTTP method is returned along with a link.
My metadata map currently looks like this:
Though it is currently unsuccessful, I've tried 'params' as well but to no avail.
Originally posted by @danbroooks at zfcampus/zf-hal#136
The text was updated successfully, but these errors were encountered: