Package net.glowstone.net.http
Class HttpClient
java.lang.Object
net.glowstone.net.http.HttpClient
-
Constructor Summary
ConstructorsConstructorDescriptionHttpClient(List<DnsEndpoint> endpoints) Creates an HttpClient configured to hit the given DNS endpoints. -
Method Summary
Modifier and TypeMethodDescriptionvoidconnect(String url, io.netty.channel.EventLoop eventLoop, HttpCallback callback) Opens a URL.
-
Constructor Details
-
HttpClient
Creates an HttpClient configured to hit the given DNS endpoints.- Parameters:
endpoints- The DNS endpoints to use for resolving domains. If the list is empty, then
-
-
Method Details
-
connect
Opens a URL.- Parameters:
url- the URL to downloadeventLoop- anEventLoopthat will receive the response bodycallback- a callback to handle the response or any error
-