-
Notifications
You must be signed in to change notification settings - Fork 49
Is it possible to hint at the HTTP method with this library? #136
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. |
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)? |
We do it exactly like that in our project. We have a listener and then we add the methods:
|
This repository has been closed and moved to laminas-api-tools/api-tools-hal; a new issue has been opened at laminas-api-tools/api-tools-hal#13. |
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.
The text was updated successfully, but these errors were encountered: