Code example for DefaultHttpClient

Methods: getParams

0
        reg.register(new Scheme("http", PlainSocketFactory.getSocketFactory(), 80));
        reg.register(new Scheme("https", SSLSocketFactory.getSocketFactory(), 443));
 
        final ThreadSafeClientConnManager manager = new ThreadSafeClientConnManager(config, reg);
 
        final DefaultHttpClient client = new DefaultHttpClient(manager, config);
        client.getParams().setParameter("http.socket.timeout", 30 * 1000);
        return client;
    } 
 
    @SuppressWarnings("deprecation") 
    public static String decodeSubscriptionURL(final String url) {
        if (url.startsWith("feed/")) {
            return "feed/" + URLDecoder.decode(url.substring(5));
        } else { 
            return url;
        } 
    } 
 
    @SuppressWarnings("deprecation") 
    public static String encodeSubscriptionURL(final String url) {