protected static function httpRedirect($url, $headers = [], $redirectCode = 301)
    {
        $url = new UrlObject($url);

        $headers['Location'] = $url->val();
        $response = new Response('', $redirectCode, $headers);
        $response->sendHeaders();
    }