utils

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2022 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// UserAgent HTTP请求时使用的UA
	UserAgent = "" /* 130-byte string literal not displayed */
)

Functions

func DS

func DS(saltType int) string

func GetBytes

func GetBytes(url string, headers map[string]string) ([]byte, error)

func GetJson

func GetJson(url string, headers map[string]string) (gjson.Result, error)

func GetMD5Hash

func GetMD5Hash(text string) string

func HTTPGetReadCloser

func HTTPGetReadCloser(url string, headers map[string]string) (io.ReadCloser, error)

HTTPGetReadCloser 从 Http url 获取 io.ReadCloser

func HTTPPostReadCloser

func HTTPPostReadCloser(url string, data []byte, headers map[string]string) (io.ReadCloser, error)

HTTPPostReadCloser 从 Http url 获取 io.ReadCloser

func ParseCookie

func ParseCookie(s string) map[string]string

func PostBytes

func PostBytes(url string, data []byte, headers map[string]string) ([]byte, error)

func RandStringBytes

func RandStringBytes(n int) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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