Versions in this module Expand all Collapse all v0 v0.6.4 Dec 23, 2019 v0.6.0 Dec 3, 2019 Changes in this version + func ClientBuilder() *httpClientBuilder + type ConcurrentDownloadFlags struct + DownloadPath string + ExpectedSha1 string + Explode bool + FileName string + FileSize int64 + LocalFileName string + LocalPath string + RelativePath string + Retries int + SplitCount int + type ConnectHandler func() (*http.Response, error) + type DownloadFileDetails struct + DownloadPath string + ExpectedSha1 string + FileName string + LocalFileName string + LocalPath string + RelativePath string + Size int64 + type ErrorHandler func([]byte) error + type HttpClient struct + Client *http.Client + func (jc *HttpClient) DownloadFile(downloadFileDetails *DownloadFileDetails, logMsgPrefix string, ...) (*http.Response, error) + func (jc *HttpClient) DownloadFileConcurrently(flags ConcurrentDownloadFlags, logMsgPrefix string, ...) (*http.Response, error) + func (jc *HttpClient) DownloadFileNoRedirect(downloadPath, localPath, fileName string, ...) (*http.Response, string, error) + func (jc *HttpClient) DownloadFileWithProgress(downloadFileDetails *DownloadFileDetails, logMsgPrefix string, ...) (*http.Response, error) + func (jc *HttpClient) GetRemoteFileDetails(downloadUrl string, httpClientsDetails httputils.HttpClientDetails) (*fileutils.FileDetails, *http.Response, error) + func (jc *HttpClient) IsAcceptRanges(downloadUrl string, httpClientsDetails httputils.HttpClientDetails) (bool, *http.Response, error) + func (jc *HttpClient) ReadRemoteFile(downloadPath string, httpClientsDetails httputils.HttpClientDetails) (io.ReadCloser, *http.Response, error) + func (jc *HttpClient) Send(method, url string, content []byte, followRedirect, closeBody bool, ...) (resp *http.Response, respBody []byte, redirectUrl string, err error) + func (jc *HttpClient) SendDelete(url string, content []byte, httpClientsDetails httputils.HttpClientDetails) (resp *http.Response, body []byte, err error) + func (jc *HttpClient) SendGet(url string, followRedirect bool, ...) (resp *http.Response, respBody []byte, redirectUrl string, err error) + func (jc *HttpClient) SendHead(url string, httpClientsDetails httputils.HttpClientDetails) (resp *http.Response, body []byte, err error) + func (jc *HttpClient) SendPatch(url string, content []byte, httpClientsDetails httputils.HttpClientDetails) (resp *http.Response, body []byte, err error) + func (jc *HttpClient) SendPost(url string, content []byte, httpClientsDetails httputils.HttpClientDetails) (resp *http.Response, body []byte, err error) + func (jc *HttpClient) SendPut(url string, content []byte, httpClientsDetails httputils.HttpClientDetails) (resp *http.Response, body []byte, err error) + func (jc *HttpClient) Stream(url string, httpClientsDetails httputils.HttpClientDetails) (*http.Response, []byte, string, error) + func (jc *HttpClient) UploadFile(localPath, url, logMsgPrefix string, ...) (resp *http.Response, body []byte, err error) + type RetryableConnection struct + ConnectHandler ConnectHandler + ErrorHandler ErrorHandler + ReadTimeout time.Duration + RetriesNum int + SleepBetweenRetries time.Duration + StableConnectionWindow time.Duration + func (rt *RetryableConnection) Do() ([]byte, error)