urls

package
v0.0.0-...-512269d Latest Latest
Warning

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

Go to latest
Published: May 29, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Encode

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

对输入字符出按照指定编码进行UrlEncode处理 @Param encoding 支持uft8 gbk gb2312 gb18030编码方式

func UrlAddParams

func UrlAddParams(rawUrl string, params url.Values) (string, error)

UrlAddParams 链接添加参数

func UrlEncode

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

把Http请求参数按照指定编码进行UrlEncode编码 @Param encoding 持uft8 gbk gb2312 gb18030编码方式

Types

type UrlBuilder

type UrlBuilder struct {
	// contains filtered or unexported fields
}

func ParseUrl

func ParseUrl(rawUrl string) *UrlBuilder

func (*UrlBuilder) AddQueries

func (builder *UrlBuilder) AddQueries(queries map[string]string) *UrlBuilder

func (*UrlBuilder) AddQuery

func (builder *UrlBuilder) AddQuery(key string, value string) *UrlBuilder

func (*UrlBuilder) Build

func (builder *UrlBuilder) Build() *url.URL

func (*UrlBuilder) BuildString

func (builder *UrlBuilder) BuildString() string

func (*UrlBuilder) GetQuery

func (builder *UrlBuilder) GetQuery() url.Values

func (*UrlBuilder) GetUrl

func (builder *UrlBuilder) GetUrl() *url.URL

func (*UrlBuilder) SetQuery

func (builder *UrlBuilder) SetQuery(key string, value string) *UrlBuilder

Jump to

Keyboard shortcuts

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