Nuri Ensing
Nuri Ensing

Reputation: 2030

httpClientBuilder cannot be resolved in Java

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

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

Upvotes: 4

Views: 10484

Answers (1)

WillShackleford
WillShackleford

Reputation: 7008

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>

Upvotes: 7

Related Questions