Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

httpClientBuilder cannot be resolved in Java

Tags:

java

ssl

HttpClient httpClient = HttpClientBuilder.create().setSSLSocketFactory(socketFactory).build();

The HttpClientBuilder cannot be resolved. Anyone any idea how to fix this?

like image 271
nrii Avatar asked Mar 15 '23 15:03

nrii


1 Answers

Either download the Apache HttpClient libraries from https://hc.apache.org/downloads.cgi and add the jars to your project or add the maven dependancy:

<dependencies>
    <dependency>
        <groupId>org.apache.httpcomponents</groupId>
        <artifactId>httpclient</artifactId>
        <version>4.5</version>
    </dependency>
</dependencies>
like image 55
WillShackleford Avatar answered Mar 24 '23 02:03

WillShackleford