All Downloads are FREE. Search and download functionalities are using the official Maven repository.

dev.soffa.foundation.commons.http.HttpClient Maven / Gradle / Ivy

There is a newer version: 0.17.31
Show newest version
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