HttpMethod (String requestUrl, HTTPMethod type) { HttpMethod method = type == HTTPMethod.GET ? new GetMethod(requestUrl) : GenericRepositoryUtil.getPostMethodFromURL(requestUrl); configureHttpMethod(method); return method; }