req

package
v0.0.0-...-d9c3df7 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decode

func Decode(str string, encoding string) (string, error)

Decode 解码UrlEncode编码的字符串

@Param encoding 支持uft8 gbk gb2312 gb18030编码方式

func Encode

func Encode(str string, encoding string) (string, error)

Encode 对输入字符出按照指定编码进行UrlEncode处理

@Param encoding 支持uft8 gbk gb2312 gb18030编码方式

func NewReqInfoToMap

func NewReqInfoToMap(hashmap map[string]interface{}) map[string]interface{}

func UrlDecode

func UrlDecode(str string, encoding string) (map[string]string, error)

UrlDecode 解码UrlEncode编码的字符串

@Param encoding 支持uft8 gbk gb2312 gb18030编码方式

func UrlEncode

func UrlEncode(params map[string]string, encoding string) (string, error)

UrlEncode 把Http请求参数按照指定编码进行UrlEncode编码

@Param encoding 支持uft8 gbk gb2312 gb18030编码方式

Types

type ReqInfo

type ReqInfo struct {
	Method   string
	Url      string
	Body     string
	Header   map[string]string
	Proxy    string
	Timeout  string
	Retry    string
	Mode     string
	H1       bool
	Redirect bool
}

func NewReqInfo

func NewReqInfo() ReqInfo

Jump to

Keyboard shortcuts

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