znet

package
v1.9.15 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DoRequest

func DoRequest(method, url string, data string, header z.Map) ([]byte, error)

func FreeHttpClient

func FreeHttpClient(client *http.Client)

func GetHttpClient

func GetHttpClient() *http.Client

func GetJson

func GetJson(url string, body string, header z.Map) (z.Map, error)

Get请求

func PostJson

func PostJson(url string, body string, header z.Map) (z.Map, error)

Post 请求

func SendEmail added in v1.0.6

func SendEmail(toAddress, toName, subject, body string) error

Types

type EmailConf added in v1.0.6

type EmailConf struct {
	Host     string `json:"host"`
	Port     int    `json:"port"`
	UserName string `json:"userName"`
	Password string `json:"password"`
	FromName string `json:"formName"`
}

type ErrorStatusCode added in v1.6.4

type ErrorStatusCode struct {
	Code int
	Msg  string
}

func (ErrorStatusCode) Error added in v1.6.4

func (err ErrorStatusCode) Error() string

Jump to

Keyboard shortcuts

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