/** * Send out a DELETE-HTTP request. Errors will be logged, returned values just ignored. * * @param url the URL to be used for the DELETE request. * @return the response body or <code>NULL</code> when the request went wrong */ public static String sendHttpDeleteRequest(String url) { return HttpUtil.executeUrl("DELETE", url, 1000); }
/** * Send out a POST-HTTP request. Errors will be logged, returned values just ignored. * * @param url the URL to be used for the POST request. * @return the response body or <code>NULL</code> when the request went wrong */ public static String sendHttpPostRequest(String url) { return HttpUtil.executeUrl("POST", url, 1000); }
/** * Send out a POST-HTTP request. Errors will be logged, returned values just ignored. * * @param url the URL to be used for the POST request. * @param contentType the content type of the given <code>content</code> * @param content the content to be send to the given <code>url</code> or <code>null</code> if no * content should be send. * @return the response body or <code>NULL</code> when the request went wrong */ public static String sendHttpPostRequest(String url, String contentType, String content) { return HttpUtil.executeUrl("POST", url, IOUtils.toInputStream(content), contentType, 1000); }
/** * Send out a GET-HTTP request. Errors will be logged, returned values just ignored. * * @param url the URL to be used for the GET request. * @return the response body or <code>NULL</code> when the request went wrong */ public static String sendHttpGetRequest(String url) { return HttpUtil.executeUrl("GET", url, 5000); }