Versions in this module Expand all Collapse all v1 v1.0.4 May 8, 2026 Changes in this version + func HttpGet[T any](ser IService, path string, sets ...Set) (res T, body []byte, err error) + func HttpJsonToObj[T any](bs []byte) (res T, err error) + func HttpPost[T any](ser IService, path string, in any, sets ...Set) (res T, body []byte, err error) + func ReadResponse(resp *http.Response) (res []byte, err error) + func ResponseToObj[T any](resp *http.Response) (res T, bs []byte, err error) + type Config struct + Disabled bool + IdleConnTimeout int + MaxConnsPerHost int + MaxIdleConns int + RootUrl string + Timeout int + Tls *TLSConfig + func (this_ *Config) GetConnProxy() ConnProxy + func (this_ *Config) SetConnProxy(connProxy ConnProxy) + type ConnProxy interface + Dial func(n string, addr string) (net.Conn, error) + type DataResponse struct + Code string + Data T + Msg string + func HttpPostDataResponse[T any](ser IService, path string, in any, sets ...Set) (res *DataResponse[T], body []byte, err error) + type IService interface + Close func() + Get func(path string, sets ...Set) (res []byte, err error) + GetRequest func(url string, sets ...Set) (resp *http.Response, err error) + GetUrl func(path string) (res string) + Info func() (info *Info, err error) + Post func(path string, data any, sets ...Set) (res []byte, err error) + PostRequest func(url string, body io.Reader, sets ...Set) (resp *http.Response, err error) + Request func(method, url string, body io.Reader, sets ...Set) (resp *http.Response, err error) + func New(config *Config) (IService, error) + type Info struct + type Request struct + func (this_ *Request) SetHeader(name, value string) *Request + type Response struct + type Service struct + func (this_ *Service) Close() + func (this_ *Service) DataReader(data any) (res io.Reader, err error) + func (this_ *Service) Get(path string, sets ...Set) (res []byte, err error) + func (this_ *Service) GetRequest(url string, sets ...Set) (resp *http.Response, err error) + func (this_ *Service) GetUrl(path string) (res string) + func (this_ *Service) Info() (res *Info, err error) + func (this_ *Service) Post(path string, data any, sets ...Set) (res []byte, err error) + func (this_ *Service) PostRequest(url string, body io.Reader, sets ...Set) (resp *http.Response, err error) + func (this_ *Service) Request(method, url string, body io.Reader, sets ...Set) (resp *http.Response, err error) + type Set func(in *Request) + type TLSConfig struct + InsecureSkipVerify bool