I am using services module and rest API its working fine.
But i need to create a menu callback
where i get the json post
data and save in database.
How to get the json
data in menu callback?
Drupal Answers is a question and answer site for Drupal developers and administrators. It only takes a minute to sign up.
Sign up to join this communityThrough comments, we determined the OP would like to alter the results of the user registration service resource...
To alter the results of user registration data, implement hook_services_request_postprocess_alter() in your custom module, for example:
/**
* Implements hook_services_request_postprocess_alter().
*/
function my_module_services_request_postprocess_alter($controller, $args, &$result) {
if ($controller['callback'] == '_user_resource_register') {
$result->foo = 'bar';
}
}
This will allow the value of foo
to be available to your application that is calling the user registration service resource.
$_POST