dev.soffa.foundation.commons.http.HttpClient Maven / Gradle / Ivy
package dev.soffa.foundation.commons.http;
import java.util.Map;
public interface HttpClient {
HttpResponse request(HttpRequest request);
default HttpResponse get(String url, Map headers) {
return request(new HttpRequest("GET", url, null, headers));
}
default HttpResponse get(String url) {
return get(url, null);
}
default HttpResponse post(String url, Object data, Map headers) {
return request(new HttpRequest("POST", url, data, headers));
}
default HttpResponse post(String url, Object data) {
return post(url, data, null);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy