webclient

package
v0.0.0-...-2ec961a Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func API_DoBytesPost

func API_DoBytesPost(url string, data []byte) ([]byte, error)

func API_DoJBytesPost_Header

func API_DoJBytesPost_Header(url string, data []byte, header string) ([]byte, error)

func API_HttpGet

func API_HttpGet(url_add string) []byte

func API_Http_post_json

func API_Http_post_json(url_add string, data string) []byte

func API_Https_post

func API_Https_post(url_add string, data map[string]interface{}) []byte

func API_Https_post_json

func API_Https_post_json(url_add string, r_data string) []byte

func API_SendXmlRequest

func API_SendXmlRequest(method, path string, xmlString []byte, tlsConfig *tls.Config, timeout time.Duration) (body []byte, err error)

发送Xml请求 调用示例sendXmlRequest("POST", WXPAY_UNIFIEDORDER_URL, xmlString, config.TlsConfig, config.Timeout)

func API_Web_Form_GET_Header

func API_Web_Form_GET_Header(url_add string, header string) []byte

func API_Web_Form_POST

func API_Web_Form_POST(url_add string, data url.Values) []byte

func API_Web_Form_POST_Header

func API_Web_Form_POST_Header(url_add string, data url.Values, header string) []byte

func DoBytesPost

func DoBytesPost(url string, data []byte) (string, error)

func DoJBytesPost_Header

func DoJBytesPost_Header(url string, data []byte, header string) (string, error)

func HttpGet

func HttpGet(url_add string) string

func Http_post_json

func Http_post_json(url_add string, data string) string

func Https_post

func Https_post(url_add string, data map[string]interface{}) string

func Https_post_json

func Https_post_json(url_add string, r_data string) string

func Https_post_json_custhead

func Https_post_json_custhead(url_add string, r_data []byte, header map[string]string) []byte

func SendXmlRequest

func SendXmlRequest(method, path string, xmlString []byte, tlsConfig *tls.Config, timeout time.Duration) (body []byte, err error)

发送Xml请求 调用示例sendXmlRequest("POST", WXPAY_UNIFIEDORDER_URL, xmlString, config.TlsConfig, config.Timeout)

func Web_Form_GET_Header

func Web_Form_GET_Header(url_add string, header string) string

func Web_Form_POST

func Web_Form_POST(url_add string, data url.Values) string

func Web_Form_POST_Header

func Web_Form_POST_Header(url_add string, data url.Values, header string) string

Types

type Http_Client

type Http_Client struct {
	MaxIdleConns        int
	MaxIdleConnsPerHost int
	IdleConnTimeout     int
	IsKeepActive        int
	Client              *http.Client
}
var G_Http_client *Http_Client

func NewHttpClient

func NewHttpClient() *Http_Client

func (*Http_Client) API_DoBytesPost

func (this *Http_Client) API_DoBytesPost(url string, data []byte) ([]byte, error)

func (*Http_Client) API_DoJBytesPost_Header

func (this *Http_Client) API_DoJBytesPost_Header(url string, data []byte, header string) ([]byte, error)

func (*Http_Client) API_HttpGet

func (this *Http_Client) API_HttpGet(url_add string) []byte

func (*Http_Client) API_Http_post_json

func (this *Http_Client) API_Http_post_json(url_add string, data string) []byte

func (*Http_Client) API_Https_post

func (this *Http_Client) API_Https_post(url_add string, data map[string]interface{}) []byte

func (*Http_Client) API_Https_post_json

func (this *Http_Client) API_Https_post_json(url_add string, r_data string) []byte

func (*Http_Client) API_SendXmlRequest

func (this *Http_Client) API_SendXmlRequest(method, path string, xmlString []byte, tlsConfig *tls.Config, timeout time.Duration) (body []byte, err error)

发送Xml请求 调用示例sendXmlRequest("POST", WXPAY_UNIFIEDORDER_URL, xmlString, config.TlsConfig, config.Timeout)

func (*Http_Client) API_Web_Form_GET_Header

func (this *Http_Client) API_Web_Form_GET_Header(url_add string, header string) []byte

func (*Http_Client) API_Web_Form_POST

func (this *Http_Client) API_Web_Form_POST(url_add string, data url.Values) []byte

func (*Http_Client) API_Web_Form_POST_Header

func (this *Http_Client) API_Web_Form_POST_Header(url_add string, data url.Values, header string) []byte

func (*Http_Client) ApiGetSetHeader

func (this *Http_Client) ApiGetSetHeader(url_add string, header map[string]string) []byte

func (*Http_Client) ApiPostSetHeader

func (this *Http_Client) ApiPostSetHeader(url_add string, data []byte, header map[string]string) []byte

func (*Http_Client) CreateHTTPClient

func (this *Http_Client) CreateHTTPClient() *http.Client

createHTTPClient for connection re-use

func (*Http_Client) DoBytesPost

func (this *Http_Client) DoBytesPost(url string, data []byte) (string, error)

func (*Http_Client) DoJBytesPost_Header

func (this *Http_Client) DoJBytesPost_Header(url string, data []byte, header string) (string, error)

func (*Http_Client) HttpGet

func (this *Http_Client) HttpGet(url_add string) string

func (*Http_Client) Http_post_json

func (this *Http_Client) Http_post_json(url_add string, data string) string

func (*Http_Client) Http_post_json_Head

func (this *Http_Client) Http_post_json_Head(url_add string, data string, header map[string]string) string

func (*Http_Client) Https_post

func (this *Http_Client) Https_post(url_add string, data map[string]interface{}) string

func (*Http_Client) Https_post_json

func (this *Http_Client) Https_post_json(url_add string, r_data string) string

func (*Http_Client) Init_HTTPClient

func (this *Http_Client) Init_HTTPClient()

func (Http_Client) SendXmlRequest

func (this Http_Client) SendXmlRequest(method, path string, xmlString []byte, tlsConfig *tls.Config, timeout time.Duration) (body []byte, err error)

发送Xml请求 调用示例sendXmlRequest("POST", WXPAY_UNIFIEDORDER_URL, xmlString, config.TlsConfig, config.Timeout)

func (*Http_Client) SetMaxconns

func (this *Http_Client) SetMaxconns(id int) *Http_Client

init HTTPClient

func (*Http_Client) SetMaxperHost

func (this *Http_Client) SetMaxperHost(id int) *Http_Client

func (*Http_Client) SetTimeOut

func (this *Http_Client) SetTimeOut(id int) *Http_Client

func (*Http_Client) Web_Form_GET_Header

func (this *Http_Client) Web_Form_GET_Header(url_add string, header string) string

func (*Http_Client) Web_Form_POST

func (this *Http_Client) Web_Form_POST(url_add string, data url.Values) string

func (*Http_Client) Web_Form_POST_Header

func (this *Http_Client) Web_Form_POST_Header(url_add string, data url.Values, header string) string

Jump to

Keyboard shortcuts

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