common_http/src/main/java/com/xiongyingqi/http/HttpBuilder.java
public HttpBuilder param(String name, String value, boolean urlEncoding) {
        String encodedValue = null;
        if(urlEncoding && value != null){
            try {
                encodedValue = URLEncoder.encode(value, charset.name());
            } catch (UnsupportedEncodingException e) {
                Logger.error(e);
            }
        }
        if (encodedValue == null) {
            encodedValue = value;
        }
        NameValuePair nameValuePair = new BasicNameValuePair(name, encodedValue);
        this.nameValuePairs.add(nameValuePair);
        return this;
    }
public HttpBuilder param(String name, String value, boolean urlEncoding) {
        String encodedValue = null;
        if(urlEncoding && value != null){
            try {
                encodedValue = URLEncoder.encode(value, charset.name());
            } catch (UnsupportedEncodingException e) {
                Logger.error(e);
            }
        }
        if (encodedValue == null) {
            encodedValue = value;
        }
        NameValuePair nameValuePair = new BasicNameValuePair(name, encodedValue);
        this.nameValuePairs.add(nameValuePair);
        return this;
    }
public HttpBuilder param ( String name , String value , boolean urlEncoding ) { String encodedValue = null ; if ( urlEncoding && value != null ) { try { encodedValue = URLEncoder . encode ( value , charset . name ( ) ) ; } catch ( UnsupportedEncodingException e ) { Logger . error ( e ) ; } } if ( encodedValue == null ) { encodedValue = value ; } NameValuePair nameValuePair = new BasicNameValuePair ( name , encodedValue ) ; this . nameValuePairs . add ( nameValuePair ) ; return this ; }
增加参数
@param name
@param value
@param urlEncoding
@return
增加参数