netutils

package
v1.0.60 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyHeaderByNames added in v1.0.54

func CopyHeaderByNames(src, dst http.Header, names ...string) http.Header

func HeaderSubset added in v1.0.54

func HeaderSubset(header http.Header, names ...string) http.Header

func JoinRawUrl

func JoinRawUrl(base string, target string) (string, error)

func JoinUrl

func JoinUrl(base, target *url.URL) *url.URL

func JoinUrlPro

func JoinUrlPro(base, target *url.URL, rawBase, rawTarget string) (joined *url.URL, err error)

func JoinUrlWithRaw

func JoinUrlWithRaw(base *url.URL, target string) (*url.URL, error)

func JsonMarshalUrlInfo

func JsonMarshalUrlInfo(_url *url.URL, prefix, indent string) (result []byte)

func JsonifyUrlInfo

func JsonifyUrlInfo(_url *url.URL, prefix, indent string) string

func NewHeaderFromMap added in v1.0.41

func NewHeaderFromMap(m map[string]string) http.Header

func NewUrlValuesFromMap added in v1.0.42

func NewUrlValuesFromMap(m map[string]string) url.Values

func ParseAndJsonifyUrl

func ParseAndJsonifyUrl(_url string) (string, error)

func PurgeHeader added in v1.0.54

func PurgeHeader(header http.Header, names ...string) http.Header

func PurgeHeaderInplace added in v1.0.54

func PurgeHeaderInplace(header http.Header, names ...string) http.Header

func UrlInfo

func UrlInfo(_url *url.URL) map[string]any

Types

type CookiePtr

type CookiePtr = *http.Cookie

type Cookies

type Cookies []*http.Cookie

func NewCookiesFromMap added in v1.0.41

func NewCookiesFromMap(mapping map[string]string) Cookies

func (Cookies) Native

func (cookies Cookies) Native() []*http.Cookie

func (Cookies) String

func (cookies Cookies) String() string

func (Cookies) Strings

func (cookies Cookies) Strings() types.Strings

Jump to

Keyboard shortcuts

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