private HttpRequest getHttp(HttpMethod httpMethod, StringEntity entity) {
        if (HttpMethod.post.equals(httpMethod)) {
            HttpPost http = new HttpPost();
            http.setEntity(entity);
            return http;
		} else if (HttpMethod.put.equals(httpMethod)) {
            HttpPut http = new HttpPut();
            http.setEntity(entity);
            return http;
		} else if (HttpMethod.get.equals(httpMethod)) {
            HttpGet http = new HttpGet();
            return http;
		} else if (HttpMethod.delete.equals(httpMethod)) {
            HttpDelete http = new HttpDelete();
            return http;
        }
        return null;
    }