Categorygithub.com/cavaliergopher/grab/v3
modulepackage
3.0.1
Repository: https://github.com/cavaliergopher/grab.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author

# Functions

Get sends a HTTP request and downloads the content of the requested URL to the given destination file path.
GetBatch sends multiple HTTP requests and downloads the content of the requested URLs to the given destination directory using the given number of concurrent worker goroutines.
IsStatusCodeError returns true if the given error is of type StatusCodeError.
NewClient returns a new file download Client, using default configuration.
NewRequest returns a new file transfer Request suitable for use with Client.Do.

# Variables

DefaultClient is the default client and is used by all Get convenience functions.
ErrBadChecksum indicates that a downloaded file failed to pass checksum validation.
ErrBadLength indicates that the server response or an existing file does not match the expected content length.
ErrFileExists indicates that the destination path already exists.
ErrNoFilename indicates that a reasonable filename could not be automatically determined using the URL or response headers from a server.
ErrNoTimestamp indicates that a timestamp could not be automatically determined using the response headers from the remote server.

# Structs

A Client is a file download client.
A Request represents an HTTP file transfer request to be sent by a Client.
Response represents the response to a completed or in-progress download request.

# Interfaces

HTTPClient provides an interface allowing us to perform HTTP requests.
RateLimiter is an interface that must be satisfied by any third-party rate limiters that may be used to limit download transfer speeds.

# Type aliases

A Hook is a user provided callback function that can be called by grab at various stages of a requests lifecycle.
StatusCodeError indicates that the server response had a status code that was not in the 200-299 range (after following any redirects).