title: How to get the post parameters in before dispatch loop phalcon
body: <p>We can access post data in controller something like this:</p>
  
  <pre><code>$request = $this-&gt;di-&gt;get("request");
  $data = $request-&gt;getJsonRawBody();
  </code></pre>
  
  <p>But is there any way to access POST data in services.php. I wanted to access it in an event:</p>
  
  <pre><code>if ($event-&gt;getType() == 'beforeDispatchLoop') { 
      $url = 'http://localhost/curl_logging/curlLogging.php'; 
      $router = new \Phalcon\Mvc\Router(); 
      $uri = $router-&gt;getRewriteUri(); 
      $controller = $dispatcher-&gt;getControllerName(); 
      $action = $dispatcher-&gt;getActionName(); 
      $params = array(); 
      $params['controller'] = $controller; 
      $params['action'] = $action; 
      calling_func($url, $params);
  }
  </code></pre>
  
  <p>Thanks in advance.</p>