Can I define multiple callback methods depending on the call method?
He is my current custom API: add_action( ‘rest_api_init’, function () { register_rest_route(‘my-project/v1/form’, ‘/get’, array( ‘methods’ => WP_REST_Server::READABLE, ‘callback’ => ‘get_form’ )); }); add_action( ‘rest_api_init’, function () { register_rest_route(‘my-project/v1/form’, ‘/post’, array( ‘methods’ => ‘POST’, ‘callback’ => ‘post_form’ )); }); Here is something I would like to write, but I’m not sure if it is possible. What … Read more