public interface HttpClientProvider extends Provider
| Modifier and Type | Method and Description |
|---|---|
InputStream |
get(String uri)
Helper method
|
org.apache.http.impl.client.CloseableHttpClient |
getHttpClient()
Returns the
CloseableHttpClient that can be freely used. |
int |
postText(String uri,
String text)
Helper method
|
org.apache.http.impl.client.CloseableHttpClient getHttpClient()
CloseableHttpClient that can be freely used.
The returned HttpClient instance must never be close()d by the caller.
Closing the HttpClient instance is responsibility of this provider. However,
the objects created via the returned HttpClient need to be closed properly
by the code that instantiated them.
int postText(String uri, String text) throws IOException
uri - text - IOExceptionInputStream get(String uri) throws IOException
uri - IOExceptionCopyright © 2021 JBoss by Red Hat. All rights reserved.