public HttpResponse getResponse(CrawlDatum datum) throws Exception {
        HttpResponse response = new HttpResponse(url);
        HttpURLConnection con;

        if (proxy == null) {
            con = (HttpURLConnection) url.openConnection();
        } else {
            con = (HttpURLConnection) url.openConnection(proxy);
        }

        con.setDoInput(true);
        con.setDoOutput(true);

        if (config != null) {
            config.config(con);
        }

        if (!(datum.getParam() == null || datum.getParam().isEmpty())) {
            PrintWriter out = new PrintWriter(con.getOutputStream());
            out.print(datum.getParam());
            out.flush();
        }

        response.setCode(con.getResponseCode());

        InputStream is;
        is = con.getInputStream();

        byte[] buf = new byte[2048];
        int read;
        int sum = 0;
        int maxsize = Config.maxsize;
        ByteArrayOutputStream bos = new ByteArrayOutputStream();
        while ((read = is.read(buf)) != -1) {
            if (maxsize > 0) {
                sum = sum + read;
                if (sum > maxsize) {
                    read = maxsize - (sum - read);
                    bos.write(buf, 0, read);
                    break;
                }
            }
            bos.write(buf, 0, read);
        }

        is.close();

        response.setContent(bos.toByteArray());
        response.setHeaders(con.getHeaderFields());
        bos.close();
        return response;
    }