Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefaultFetcher ¶
type DefaultFetcher struct {
// contains filtered or unexported fields
}
DefaultFetcher implements Fetcher
func (*DefaultFetcher) DownloadFile ¶
func (d *DefaultFetcher) DownloadFile(urlPath string, maxLength int64, timeout time.Duration) ([]byte, error)
DownloadFile downloads a file from urlPath, errors out if it failed, its length is larger than maxLength or the timeout is reached.
func (*DefaultFetcher) SetHTTPUserAgent ¶
func (d *DefaultFetcher) SetHTTPUserAgent(httpUserAgent string)
Click to show internal directories.
Click to hide internal directories.