HttpPut putRequest = new HttpPut(getUrl() + generateParametersString(getParams()));
putRequest.setEntity(entity);
executeRequest(putRequest);
break;
case PATCH:
HttpPatch patchRequest = new HttpPatch(getUrl() + generateParametersString(getParams()));
patchRequest.setEntity(entity);
executeRequest(patchRequest);
default:
throw new RuntimeException(
"RequestMethod not supported, Only POST and PUT can contain body");
}