/** * Sends a http-query. * @param string $url * @param array $params * @return null|\rock\response\Response * @throws RouteException * @throws \rock\helpers\InstanceException */ public function send($url, array $params = []) { $route = $this->route; /** @var Route $route */ $route = Instance::ensure(['class' => $route::className(), 'request' => $this->getRequest($url, $params)]); if (!empty($this->route->groups)) { $check = $route->checkGroups($this->route->getRawGroups()); } else { $check = $route->checkRules($this->route->getRawRules()); } if ($check) { return $route->response; } return null; }