class HttpUtils {

    public static String urlEncode(String src) {
        if (src == null) {
            return null;
        }

        try {
            return URLEncoder.encode(src, StandardCharsets.UTF_8.name());
        } catch (UnsupportedEncodingException e) {
            // this can never happen
            throw new AssertionError("UTF-8 charset not supported!");
        }
    }

    private  HttpUtils();

}