Skip to content
This repository was archived by the owner on May 1, 2020. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -25,29 +25,54 @@ public interface Handler {
private final String authorization;
private final Map<String, String> 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<String, String> requestProperties) {

this(url, GET, null, null,requestProperties);
}

public HttpRequest(String url, String authorization, Map<String, String> 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<String, String> requestProperties) {
this(url, method, json, null, requestProperties);
}

public HttpRequest(String url, String method, String json, String authorization, Map<String, String> requestProperties) {
this.url = url;
this.method = method;
this.json = json;
this.authorization = authorization;
this.requestProperties = requestProperties;
}
// ----- POST,PUT or Other END --- //


public HttpResponse request() {

Expand Down