method = new GetMethod(url);
} else if (methodType.equalsIgnoreCase("post")) {
PostMethod postMethod = new PostMethod(url);
if (args != null) {
byte[] output = constructArgs(method, args);
postMethod.setRequestEntity(new ByteArrayRequestEntity(output));
}
method = postMethod;
} else if (methodType.equalsIgnoreCase("put")) {
method = new PutMethod(url);
if (args != null) {
byte[] output = constructArgs(method, args);
((PutMethod) method)
.setRequestEntity(new ByteArrayRequestEntity(output));
}
} else if (methodType.equalsIgnoreCase("delete")) {
method = new DeleteMethod(url);
}