Skip to content
This repository has been archived by the owner on Jan 21, 2020. It is now read-only.

Is it possible to hint at the HTTP method with this library? #136

Open
@danbroooks

Description

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:

    'Users\\V1\\Rest\\User\\UserEntity' => array(
        'entity_identifier_name' => 'id',
        'route_name' => 'users.rest.user',
        'route_identifier_name' => 'user_id',
        'hydrator' => 'Zend\\Hydrator\\ClassMethods',
        'links' => array(
            'role' => array(
                'rel' => 'create-role',
                'route' => array(
                    'name'    => 'users.rest.roles',
                    'options' => array(
                        'method' => 'GET'
                    ),
                ),
            )
        ),
    ),

Though it is currently unsuccessful, I've tried 'params' as well but to no avail.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions