private static String readString(InputStream inputStream) {
        InputStreamReader reader = new InputStreamReader(inputStream);
        StringBuilder stringBuilder = new StringBuilder();
        int ch;
        try {
            while ( (ch = reader.read()) != -1 ) {
                stringBuilder.append(ch);
            }
        } catch (IOException e) {
            throw new RuntimeException(e);
        } finally {
            try {
                reader.close();
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }

        return stringBuilder.toString();
    }