public class HTTPFileRetriever extends Object
| Constructor and Description |
|---|
HTTPFileRetriever(okhttp3.OkHttpClient httpClient) |
| Modifier and Type | Method and Description |
|---|---|
Optional<String> |
fetchFile(String url)
Request file.
|
Optional<String> |
fetchFileIfNotModified(String url)
Request file by sending an "If-Modified-Since" header so that the file won't be fetched if it hasn't been
modified since the last request.
|
@Inject public HTTPFileRetriever(okhttp3.OkHttpClient httpClient)
public Optional<String> fetchFile(String url) throws IOException
IOExceptionpublic Optional<String> fetchFileIfNotModified(String url) throws IOException
IOExceptionCopyright © 2012–2020 Graylog, Inc.. All rights reserved.