Skip to content
This repository was archived by the owner on Sep 24, 2018. It is now read-only.
This repository was archived by the owner on Sep 24, 2018. It is now read-only.

Register a route with by specifying default request arguments #617

@danielbachhuber

Description

@danielbachhuber

Currently we have:

register_json_route( 'wp', '/users/me', array(
     'methods'         => 'GET',
     'callback'        => array( $controller, 'get_current_item' ),

I should be able to register a route to get_item() with some default argument to get the same effect without having to create a standalone get_current_item() method.

Another use case is an endpoint with the "top posts".

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions