private String request(String host, String path) {
        Socket socket = null;
        String htmlDoc = null;
        try {
            //Connect to the server
            socket = new Socket(host, BaseConfig.HTTP_PORT);
            socket.setSoTimeout(BaseConfig.SOCKET_TIMEOUT);

            //Get an output stream
            BufferedWriter out = new BufferedWriter(new
                    OutputStreamWriter(socket.getOutputStream()));

            //Send a request to get the root page of the server
            out.write("GET " + path + " HTTP/1.0\n\n");
            if(headers != null) {
                for(int i=0; i<headers.size(); i++) {
                    out.write(headers.get(i).toString());
                }
            } else {
                out.write("User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.17 Safari/537.36");
            }
            out.flush();

            //we have sent it. get the sent time
            long sentTime = System.currentTimeMillis();
            BufferedReader in = new BufferedReader(new
                    InputStreamReader(socket.getInputStream()));

            //using a StringBuilder to store the content of the page
            StringBuilder htmlBuilder = new StringBuilder();
            String line;
            boolean headerEnded = false;
            while((line = in.readLine())!=null) {

                //Separating the header from the content
                if(line.equals("") && !headerEnded) {
                    headerEnded = true;
                    continue;
                }

                //append the content
                if(headerEnded) htmlBuilder.append(line);
            }

            htmlDoc = htmlBuilder.toString();

            in.close();

            //we have completely received the page
            long receivedTime = System.currentTimeMillis();
            long responseTime = receivedTime - sentTime;
        } catch (UnknownHostException e) {
            LOGGER.severe("UnknownHostException: " + e.getMessage());
        } catch (IOException e) {
            LOGGER.severe("IOException: " + e.getMessage());
        }
        return htmlDoc;
    }