Documentation
¶
Index ¶
Constants ¶
View Source
const HTTPTimeout = 10 * time.Second
HTTPTimeout is the default timeout for HTTP requests.
Variables ¶
View Source
var HTTPClient = &http.Client{ Timeout: HTTPTimeout, }
HTTPClient is a shared HTTP client with the default timeout.
Functions ¶
func DownloadToFile ¶
DownloadToFile performs a GET request and saves the response body to savePath. Creates parent directories as needed.
func DownloadToMemory ¶
DownloadToMemory performs a GET request and returns the response body.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.