All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.ionic.sdk.httpclient.HttpUtils Maven / Gradle / Ivy

Go to download

The Ionic Java SDK provides an easy-to-use interface to the Ionic Platform.

There is a newer version: 2.9.0
Show newest version
package com.ionic.sdk.httpclient;

import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;

/**
 * Utility class containing various useful functions for working with http data.
 */
public final class HttpUtils {

    /**
     * Constructor.
     * http://checkstyle.sourceforge.net/config_design.html#FinalClass
     */
    private HttpUtils() {
    }

    /**
     * @param value the input to be encoded
     * @return the URL encoded representation of the input
     * @throws UnsupportedEncodingException should never happen {@link StandardCharsets}
     */
    public static String urlEncode(final String value) throws UnsupportedEncodingException {
        return URLEncoder.encode(value, StandardCharsets.UTF_8.displayName());
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy