Modify Rest client methods without headers
@@ -103,6 +103,18 @@ public class RESTClient {
return httpclient.execute(request);
}
+ /**
+ * Sends an HTTP GET request to the specified URL.
+ *
+ * @param url target endpoint URL
+ * @return returned HTTP response
+ * @throws IOException if an error occurs while making the invocation
+ */
+ public HttpResponse doGet(String url) throws IOException {
+ HttpUriRequest request = new HttpGet(url);
+ return httpclient.execute(request);
+ }
+
/**
* Sends a HTTP POST request to the specified URL.
*
@@ -167,6 +179,18 @@ public class RESTClient {
return httpclient.execute(request);
}
+ /**
+ * Sends an HTTP DELETE request to the specified URL.
+ *
+ * @param url target endpoint URL
+ * @return returned HTTP response
+ * @throws IOException if an error occurs while making the invocation
+ */
+ public HttpResponse doDelete(String url) throws IOException {
+ HttpUriRequest request = new HttpDelete(url);
+ return httpclient.execute(request);
+ }
+
/**
* Sends a HTTP PATCH request to the specified URL.
*
