requests

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2024 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Request

func Request(url url.URL, method string, header map[string]string, body io.Reader) (*http.Response, error)

Request 请求URL, 返回响应; 运行成功后请添加`defer resp.Body.Close()`到你的代码内

Types

type Downloader

type Downloader struct {
	URL      url.URL // 下载的 URL
	FileName string  // 文件名
	// contains filtered or unexported fields
}

func NewDownloader

func NewDownloader(url url.URL) *Downloader

func (*Downloader) Download

func (d *Downloader) Download() (string, error)

Jump to

Keyboard shortcuts

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