static String encode(String value) {
        try {
            return URLEncoder.encode(value, "UTF-8");
        } catch (final UnsupportedEncodingException ex) {
            throw new IllegalStateException("Error encoding value '" + value + "'.");
        }
    }
This is the main interface of the REST system.
<p>
Usage:
<pre>
    Rest rest = Rest.connect("127.0.0.1", 8080);

    CompletableFuture&lt;Response&gt; future = rest.post("user", 
        Param.of("firstname", "Adam"), 
        Param.of("lastname", "Adamsson")
    );

    future.get();
</pre>

@author  Emil Forslund
@since   1.0.0
common-parent/rest/src/main/java/com/speedment/common/rest/Rest.java