Interface WebUtil
public interface WebUtil
Small helpers for the plugin's outgoing http requests.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptioncreateConnection(String url) Opens a connection carrying the plugin's user agent.intdownloadFile(String fileUrl, Path outputPath, boolean warn404) Downloads a file to disk.
-
Field Details
-
USER_AGENT
-
REQUEST_TIMEOUT
The timeout applied to every outgoing request.
-
-
Method Details
-
downloadFile
-
createConnection
Opens a connection carrying the plugin's user agent.- Parameters:
url- the url- Returns:
- the open connection
- Throws:
IOException- if the connection cannot be opened
-