Code example for HttpParams

Methods: setLongParameter

0
            SchemeRegistry schReg = new SchemeRegistry();
            schReg.register(new Scheme("http", PlainSocketFactory
                    .getSocketFactory(), 80));
            schReg.register(new Scheme("https", PlainSocketFactory
                    .getSocketFactory(), 443));
 
            // 使用线程安全的连接管理来创建HttpClient 
            ClientConnectionManager conMgr = new ThreadSafeClientConnManager(
                    params, schReg);
            customerHttpClient = new DefaultHttpClient(conMgr, params);
        } 
        return customerHttpClient;
    } 
 
    public static String post(String url, NameValuePair... params) {
 
        try { 
            // 编码参数 
            List<NameValuePair> formparams = new ArrayList<NameValuePair>();
            // 请求参数 
Experience pair programming with AI  Get Codota for Java