httpc

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2024 License: Apache-2.0 Imports: 18 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DownLoadFile

func DownLoadFile(url, method, filename string, params map[string]interface{}, headers map[string]string) (string, error)

func DownLoadFileByProxy added in v0.1.7

func DownLoadFileByProxy(proxyUrl, requestUrl, method, filename string, params map[string]interface{}, headers map[string]string) (string, error)

func GenerateFingerprint added in v0.1.7

func GenerateFingerprint(r *http.Request) string

GenerateFingerprint 从请求头中提取信息生成指纹

func GenerateFingerprintKey added in v0.1.8

func GenerateFingerprintKey(r *http.Request, key string) string

GenerateFingerprintKey 从请求头中提取信息生成指纹,并加入唯一标识

func GetBrowserName added in v0.1.7

func GetBrowserName(userAgent string) string

GetBrowserName 获取浏览器名称

func GetOsName added in v0.1.7

func GetOsName(userAgent string) string

GetOsName 获取OS名称

func Request

func Request(url, method string, params map[string]interface{}, headers map[string]string, timeout time.Duration) (map[string]interface{}, error)

func RequestByProxy added in v0.1.7

func RequestByProxy(proxyUrl, requestUrl, method string, params map[string]interface{}, headers map[string]string, timeout time.Duration) (map[string]interface{}, error)

func RequestByte added in v0.1.7

func RequestByte(url, method string, params map[string]interface{}, headers map[string]string, timeout time.Duration) ([]byte, error)

func RequestByteByProxy added in v0.1.7

func RequestByteByProxy(proxyUrl, requestUrl, method string, params map[string]interface{}, headers map[string]string, timeout time.Duration) ([]byte, error)

func RequestString added in v0.1.7

func RequestString(url, method string, params map[string]interface{}, headers map[string]string, timeout time.Duration) (string, error)

func RequestStringByProxy added in v0.1.7

func RequestStringByProxy(proxyUrl, requestUrl, method string, params map[string]interface{}, headers map[string]string, timeout time.Duration) (string, error)

func UpLoadFileBinary

func UpLoadFileBinary(url, method, filePath string, headers map[string]string) (map[string]interface{}, error)

func UpLoadFileBinaryByProxy added in v0.1.7

func UpLoadFileBinaryByProxy(proxyUrl, requestUrl, method, filePath string, headers map[string]string) (map[string]interface{}, error)

func UpLoadFileForm

func UpLoadFileForm(url, method, filePath string, params map[string]interface{}, headers map[string]string) (map[string]interface{}, error)

func UpLoadFileFormByProxy added in v0.1.7

func UpLoadFileFormByProxy(proxyUrl, requestUrl, method, filePath string, params map[string]interface{}, headers map[string]string) (map[string]interface{}, error)

func UpLoadFileWriter

func UpLoadFileWriter(url, method, filePath string, headers map[string]string) (map[string]interface{}, error)

func UpLoadFileWriterByProxy added in v0.1.7

func UpLoadFileWriterByProxy(proxyUrl, requestUrl, method, filePath string, headers map[string]string) (map[string]interface{}, error)

func UpLoadFilesForm

func UpLoadFilesForm(url, method string, filePaths []string, params map[string]interface{}, headers map[string]string) (map[string]interface{}, error)

func UpLoadFilesFormByProxy added in v0.1.7

func UpLoadFilesFormByProxy(proxyUrl, requestUrl, method string, filePaths []string, params map[string]interface{}, headers map[string]string) (map[string]interface{}, error)

func UpLoadFilesWriter

func UpLoadFilesWriter(url, method string, filePaths []string, headers map[string]string) (map[string]interface{}, error)

func UpLoadFilesWriterByProxy added in v0.1.7

func UpLoadFilesWriterByProxy(proxyUrl, requestUrl, method string, filePaths []string, headers map[string]string) (map[string]interface{}, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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