/**
 * Allow altering the request before it is processed.
 *
 * @param \Drupal\restful\Http\RequestInterface $request
 *   The request object.
 */
function hook_restful_parse_request_alter(\Drupal\restful\Http\RequestInterface &$request)
{
    // Allow implementor modules to alter the request object.
    $request->setApplicationData('csrf_token', 'token');
}