Interface HttpClientProvider
- 
- All Superinterfaces:
- Provider
 
 public interface HttpClientProvider extends Provider - Author:
- Stian Thorgersen
 
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description InputStreamget(String uri)Helper methodorg.apache.http.impl.client.CloseableHttpClientgetHttpClient()Returns theCloseableHttpClientthat can be freely used.intpostText(String uri, String text)Helper method
 
- 
- 
- 
Method Detail- 
getHttpClientorg.apache.http.impl.client.CloseableHttpClient getHttpClient() Returns theCloseableHttpClientthat can be freely used.The returned HttpClientinstance must never beclose()d by the caller.Closing the HttpClientinstance is responsibility of this provider. However, the objects created via the returnedHttpClientneed to be closed properly by the code that instantiated them.- Returns:
 
 - 
postTextint postText(String uri, String text) throws IOException Helper method- Parameters:
- uri-
- text-
- Returns:
- http response status
- Throws:
- IOException
 
 - 
getInputStream get(String uri) throws IOException Helper method- Parameters:
- uri-
- Returns:
- response stream, you must close this stream or leaks will happen
- Throws:
- IOException
 
 
- 
 
-