Documentation ¶ Index ¶ Variables func Get(uri string, body interface{}) error func GetFile(uri string, file string) error func GetString(uri string) (string, error) func GetWriter(uri string, w io.Writer) error func Init(opt *Options) type Options func (o *Options) Default() Constants ¶ This section is empty. Variables ¶ View Source var ( Retry int RetryWait int Timeout int Proxy string UserAgent string Debug bool ) Functions ¶ func Get ¶ func Get(uri string, body interface{}) error func GetFile ¶ func GetFile(uri string, file string) error func GetString ¶ func GetString(uri string) (string, error) func GetWriter ¶ func GetWriter(uri string, w io.Writer) error func Init ¶ func Init(opt *Options) Types ¶ type Options ¶ added in v0.6.5 type Options struct { UserAgent string Proxy string // 使用代理 Retry int // 额外重试次数,默认为不做重试 RetryWait int // 重试等待时间,最小3秒 Timeout int // 超时时间,最小3秒 Debug bool } func (*Options) Default ¶ added in v0.6.5 func (o *Options) Default() Source Files ¶ View all Source files request.go Click to show internal directories. Click to hide internal directories.