Documentation
¶
Index ¶
Constants ¶
View Source
const (
DefaultUserAgent = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.5 Safari/605.1.15"
)
Variables ¶
View Source
var DefaultClient = NewClient(http.DefaultClient, Defaults())
Functions ¶
func CopyWithProgress ¶ added in v0.2.0
func CopyWithProgress(dst io.Writer, src io.ReadCloser, tpw nod.TotalProgressWriter) error
func NewResourceContext ¶ added in v0.2.0
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) Download ¶
func (dc *Client) Download(u *url.URL, force bool, tpw nod.TotalProgressWriter, pathParts ...string) error
Download gets remote resource, attempting to resume existing partial downloads if the previous attempt got interrupted. Download supports nod progress reporting. Download will use provided path parts (see NewResourceContext for file name, directory rules), and if no parts were specified - will download to the nextAvailable working directory and use source URL path base for a filename.
func (*Client) SetAuthorizationBearer ¶ added in v0.2.24
func (*Client) SetCookies ¶ added in v0.2.25
type ClientOptions ¶
func Defaults ¶
func Defaults() *ClientOptions
Click to show internal directories.
Click to hide internal directories.