Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where is WinHttpClients in HttpClient?

I'm following a example of HttpClient4.4, which is https://hc.apache.org/httpcomponents-client-4.4.x/httpclient-win/examples/org/apache/http/examples/client/win/ClientWinAuth.java

However, this class cannot be compiled, because of NOT FOUND WinHttpClients. I'm sure that the lib I imported is 4.4. So, is there anyone knows what's going on? (I have already checked my classpath. Still not found this class also.)

Thanks

like image 987
Xianyi Ye Avatar asked Nov 04 '25 07:11

Xianyi Ye


1 Answers

Windows specific is shipped as a separate module. Make sure to add httpclient-win as a dependency to your project

<dependency>
    <groupId>org.apache.httpcomponents</groupId>
    <artifactId>httpclient-win</artifactId>
    <version>4.4</version>
</dependency>
like image 68
ok2c Avatar answered Nov 07 '25 09:11

ok2c



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!