private String parseBody() throws IOException {
        StringBuilder body = new StringBuilder();
        String length = headers.get("Content-Length");
        if (length != null) {
            while (body.length() < Integer.parseInt(length)) {
                body.append((char) input.read());
            }
        }
        return body.toString();
    }