public boolean removeParameter ( String paramName ) throws IllegalArgumentException { log . trace ( "enter PostMethod.removeParameter(String)" ) ; if ( paramName == null ) { throw new IllegalArgumentException ( "Argument passed to removeParameter(String) cannot be null" ) ; } boolean removed = false ; Iterator < NameValuePair > iter = this . params . iterator ( ) ; while ( iter . hasNext ( ) ) { NameValuePair pair = iter . next ( ) ; if ( paramName . equals ( pair . getName ( ) ) ) { iter . remove ( ) ; removed = true ; } } return removed ; }
Removes all parameters with the given paramName . If there is more than one parameter with the given paramName all of them are removed . If there is just one it is removed . If there are none then the request is ignored .