download

package
v0.0.36 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 21, 2019 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	InvalidStatusCode = -1
)

Variables

This section is empty.

Functions

func DoHTTPGet added in v0.0.12

func DoHTTPGet(client *http.Client, url string, fnModifyRequest func(req *http.Request) error) ([]byte, int, error)

DoHTTPGet makes a GET request with the given client

func DoHTTPMethod added in v0.0.12

func DoHTTPMethod(client *http.Client, req *http.Request, fnModifyRequest func(req *http.Request) error) ([]byte, int, error)

DoHTTPMethod performs a given http method with a given client

func HTTPGet added in v0.0.11

func HTTPGet(url string, fnModifyRequest func(req *http.Request) error) ([]byte, int, error)

HTTPGet makes a GET request

Types

type Downloader

type Downloader interface {
	// Get retrieves the url content
	Get(url string, fnModifyRequest func(req *http.Request) error) ([]byte, int, error)
	Close() error
}

Downloader represents an interface to download

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL