Versions in this module Expand all Collapse all v0 v0.2.0 Jan 13, 2025 Changes in this version + func FasthttpRequest(client *http.Client, reqMethod, reqUrl, postData string, ...) (body []byte, err error) + func Get(url string) ([]byte, error) + func HttpDeleteForm(client *http.Client, reqUrl string, postData url.Values, ...) ([]byte, error) + func HttpGet(client *http.Client, reqUrl string) (map[string]any, error) + func HttpGet2(client *http.Client, reqUrl string, headers map[string]string) (map[string]any, error) + func HttpGet3(client *http.Client, reqUrl string, headers map[string]string) ([]any, error) + func HttpGet4(client *http.Client, reqUrl string, headers map[string]string, result any, ...) error + func HttpGet5(client *http.Client, reqUrl string, headers map[string]string) ([]byte, error) + func HttpPostForm(client *http.Client, reqUrl string, postData url.Values) ([]byte, error) + func HttpPostForm2(client *http.Client, reqUrl string, postData url.Values, ...) ([]byte, error) + func HttpPostForm3(client *http.Client, reqUrl string, postData string, headers map[string]string) ([]byte, error) + func HttpPostForm4(client *http.Client, reqUrl string, postData map[string]string, ...) ([]byte, error) + func HttpPut(client *http.Client, reqUrl string, postData url.Values, ...) ([]byte, error) + func HttpRequest(client *http.Client, reqType, reqUrl, postData string, ...) (body []byte, err error) + func HttpZB(client *http.Client, reqUrl string) (bodyDataMap map[string]map[string]string, err error) + func HttpZBP(client *http.Client, reqUrl string) (bodyDataMap map[string]map[string]float64, err error) + func NewRequest(client *http.Client, reqType, reqUrl, postData string, ...) (body []byte, err error) + type WsBuilder struct + func NewWsBuilder() *WsBuilder + func (b *WsBuilder) AutoReconnect() *WsBuilder + func (b *WsBuilder) Build() *WsConn + func (b *WsBuilder) ConnectSuccessAfterSendMessage(msg func() []byte) *WsBuilder + func (b *WsBuilder) DecompressFunc(f func([]byte) ([]byte, error)) *WsBuilder + func (b *WsBuilder) DisableEnableCompression() *WsBuilder + func (b *WsBuilder) Dump() *WsBuilder + func (b *WsBuilder) ErrorHandleFunc(f func(err error)) *WsBuilder + func (b *WsBuilder) Heartbeat(heartbeat func() []byte, t time.Duration) *WsBuilder + func (b *WsBuilder) ProtoHandleFunc(f func([]byte) error) *WsBuilder + func (b *WsBuilder) ProxyUrl(proxyUrl string) *WsBuilder + func (b *WsBuilder) ReconnectInterval(t time.Duration) *WsBuilder + func (b *WsBuilder) ReqHeader(key, value string) *WsBuilder + func (b *WsBuilder) WsUrl(wsUrl string) *WsBuilder + type WsConfig struct + ConnectSuccessAfterSendMessage func() []byte + DecompressFunc func([]byte) ([]byte, error) + DisableEnableCompression bool + ErrorHandleFunc func(err error) + HeartbeatData func() []byte + HeartbeatIntervalTime time.Duration + IsAutoReconnect bool + IsDump bool + ProtoHandleFunc func([]byte) error + ProxyUrl string + ReqHeaders map[string][]string + WsUrl string + type WsConn struct + func (ws *WsConn) CloseWs() + func (ws *WsConn) NewWs() *WsConn + func (ws *WsConn) SendCloseMessage(msg []byte) + func (ws *WsConn) SendJsonMessage(m any) error + func (ws *WsConn) SendMessage(msg []byte) + func (ws *WsConn) SendPingMessage(msg []byte) + func (ws *WsConn) SendPongMessage(msg []byte) + func (ws *WsConn) Subscribe(subEvent any) error