private HashMap<String, String> parseCookies() {
        HashMap<String, String> cookiesMap = new HashMap<>();
        String cookie = headers.get("Cookie");
        if (cookie != null) {
            String [] cookies = cookie.split(";");
            for(String cookiePair : cookies) {
                String [] cookieKeyVal = cookiePair.split("=");
                cookiesMap.put(cookieKeyVal[0], cookieKeyVal[1]);
            }
        }
        return cookiesMap;
    }