public function createResponse($requestMethod = null, $url = null) {
        if ( ! $requestMethod) {
            $requestMethod = $this->getRequestMethod();
        }

        if ( ! $url) {
            $url = $this->getUrl();
        }

        $route = $this->router->match($requestMethod, $url);

        if ($route instanceof IRoute) {
            return $this->responseBuilder->buildResponseForRoute($route);
        }

        return $this->responseBuilder->buildDefaultErrorResponse();
    }
public function createResponse($requestMethod = null, $url = null) {
        if ( ! $requestMethod) {
            $requestMethod = $this->getRequestMethod();
        }

        if ( ! $url) {
            $url = $this->getUrl();
        }

        $route = $this->router->match($requestMethod, $url);

        if ($route instanceof IRoute) {
            return $this->responseBuilder->buildResponseForRoute($route);
        }

        return $this->responseBuilder->buildDefaultErrorResponse();
    }
@param null $requestMethod
@param null $url

@return IHttpResponse