diff --git a/http-request/src/main/java/com/apptakk/http_request/HttpRequest.java b/http-request/src/main/java/com/apptakk/http_request/HttpRequest.java index 2ceb2dd..34926e0 100644 --- a/http-request/src/main/java/com/apptakk/http_request/HttpRequest.java +++ b/http-request/src/main/java/com/apptakk/http_request/HttpRequest.java @@ -25,22 +25,45 @@ public interface Handler { private final String authorization; private final Map requestProperties; + // ----- GET START --- // public HttpRequest(String url) { - this(url, GET, null, null); + + this(url, GET, null, null,null); + } + + public HttpRequest(String url,String authorization) { + + this(url, GET, null, authorization,null); } - public HttpRequest(String url, String method) { - this(url, method, null, null); + public HttpRequest(String url, Map requestProperties) { + + this(url, GET, null, null,requestProperties); + } + + public HttpRequest(String url, String authorization, Map requestProperties) { + + this(url, GET, null, authorization,requestProperties); } + // ----- GET END --- // + + + + // ----- POST,PUT or Other START --- // public HttpRequest(String url, String method, String json) { - this(url, method, json, null); + + this(url, method, json, null,null); } public HttpRequest(String url, String method, String json, String authorization) { this(url, method, json, authorization, null); } + public HttpRequest(String url, String method, String json, Map requestProperties) { + this(url, method, json, null, requestProperties); + } + public HttpRequest(String url, String method, String json, String authorization, Map requestProperties) { this.url = url; this.method = method; @@ -48,6 +71,8 @@ public HttpRequest(String url, String method, String json, String authorization, this.authorization = authorization; this.requestProperties = requestProperties; } + // ----- POST,PUT or Other END --- // + public HttpResponse request() {