Post method not working on non-CRUD methods I'm just trying to create custom rest service action but I can't get it. I have created end_point called "testing". Whenever I try to post the data it shows access denied for authenticated user. Where I'm going wrong? 

The steps I followed:


used advanced rest client chrome extension
http://localhost/testing/test/username   
In dataform I added data "username" = "abc";


I can't get the name. What I expecting is the post call must return the username "abc" according to my below function. 

function my_module_service_services_resources() {        
    return array(
      'test' =&gt; array(
         'actions' =&gt; array(
            'username' =&gt; array(
              'check' =&gt; array(
                'help' =&gt; 'Checks username for uniqueness',
               'callback' =&gt; 'test_module_username_check',
               'access callback' =&gt; 'my_module_service_access',
                'access arguments' =&gt; array('view'),
                'access arguments append' =&gt; TRUE,
                'args' =&gt; array(
                  array(
                    'name' =&gt; 'username',
                    'type' =&gt; 'string',
                    'description' =&gt; 'The username to check',
                    'source' =&gt; 'data',
                    'optional' =&gt; FALSE,
                  ),
                ),
              ),
            ),
          ),
       ),
    );
  }


  function test_module_username_check($username) {
    return $username;
  }


  function my_module_service_access() {
    return true;
  }
After debugging the action method of user/login (default in services module), I found where I went wrong. In my code, I added extra array called check inside username. When I remove that array everything is going well. Here the updated code 

function my_module_service_services_resources() {        
    return array(
      'test' =&gt; array(
         'actions' =&gt; array(
            'username' =&gt; array(
              'help' =&gt; 'Checks username for uniqueness',
              'callback' =&gt; 'test_module_username_check',
              'access callback' =&gt; 'my_module_service_access',
              'access arguments' =&gt; array('view'),
              'access arguments append' =&gt; TRUE,
              'args' =&gt; array(
                array(
                  'name' =&gt; 'username',
                  'type' =&gt; 'string',
                  'description' =&gt; 'The username to check',
                  'source' =&gt; 'data',
                  'optional' =&gt; FALSE,
                ),
              ),
            ),
          ),
       ),
    );
  }


  function test_module_username_check($username) {
    return $username;
  }


  function my_module_service_access() {
    return true;
  }