// may be replaced by the New method - however the New method is not yet fully tested so this is stil used.
public HttpMethod createRequestMethod(HttpRequestHeader header, HttpBody body) throws URIException {
HttpMethod httpMethod = null;
String method = header.getMethod();
URI uri = header.getURI();
String version = header.getVersion();
if (method.equalsIgnoreCase(GET)) {
httpMethod = new GetMethod();
} else if (method.equalsIgnoreCase(POST)) {
httpMethod = new PostMethod();
} else if (method.equalsIgnoreCase(DELETE)) {
httpMethod = new DeleteMethod();
} else if (method.equalsIgnoreCase(PUT)) {
httpMethod = new PutMethod();
} else if (method.equalsIgnoreCase(HEAD)) {
httpMethod = new HeadMethod();
} else if (method.equalsIgnoreCase(OPTIONS)) {
httpMethod = new OptionsMethod();
} else if (method.equalsIgnoreCase(TRACE)) {
httpMethod = new TraceMethod(uri.toString());
} else {
httpMethod = new GenericMethod(method);
}
httpMethod.setURI(uri);