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

java.net.http.HttpClient Maven / Gradle / Ivy

package java.net.http;

import java.io.IOException;
import java.net.ProxySelector;
import java.time.Duration;

/**
 * For the Java 8 compatibility when compiled with JDK 11+.
 *
 * @author L.cm
 */
public abstract class HttpClient {

    public static HttpClient.Builder newBuilder() {
        return null;
    }

    public abstract  HttpResponse send(HttpRequest request, HttpResponse.BodyHandler responseBodyHandler) throws IOException, InterruptedException;

    public interface Builder {
        Builder connectTimeout(Duration duration);

        Builder proxy(ProxySelector proxySelector);

        HttpClient build();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy