// be able to support two elements with the same name.
if (webRequestSettings.getEncodingType() == FormEncodingType.URL_ENCODED
&& method instanceof PostMethod) {
final PostMethod postMethod = (PostMethod) httpMethod;
for (final NameValuePair pair : webRequestSettings.getRequestParameters()) {
postMethod.removeParameter(pair.getName(), pair.getValue());
}
for (final NameValuePair pair : webRequestSettings.getRequestParameters()) {
postMethod.addParameter(pair.getName(), pair.getValue());
}