Versions in this module Expand all Collapse all v0 v0.2.33 Apr 25, 2024 Changes in this version + const OPT_PROXY + const OPT_SSL + const OPT_TIMEOUT + const PROXY_HTTP + const PROXY_HTTPS + const PROXY_SOCKS4 + const PROXY_SOCKS4A + const PROXY_SOCKS5 + func GetUrlParam(ul, key string) string + func HttpBuildQuery(values lib.InRow) string + func SaveRemoteFile(remoteFile, localFullName string) bool + func UrlDecode(queryString string) string + func UrlEncode(queryString string) string + type HttpClient struct + func New() *HttpClient + func (h *HttpClient) Connect(url string, values lib.InRow) *HttpResponse + func (h *HttpClient) Delete(url string, values lib.InRow) *HttpResponse + func (h *HttpClient) Get(url string, values lib.InRow) *HttpResponse + func (h *HttpClient) Head(url string) *HttpResponse + func (h *HttpClient) Options(url string, values lib.InRow) *HttpResponse + func (h *HttpClient) Patch(url string, values lib.InRow) *HttpResponse + func (h *HttpClient) Post(url string, values lib.InRow) *HttpResponse + func (h *HttpClient) PostJson(url string, value interface{}) *HttpResponse + func (h *HttpClient) PostMultipart(url string, values lib.InRow) *HttpResponse + func (h *HttpClient) PostXml(url string, value interface{}) *HttpResponse + func (h *HttpClient) Put(url string, values lib.InRow) *HttpResponse + func (h *HttpClient) Trace(url string, values lib.InRow) *HttpResponse + func (h *HttpClient) WithCookie(cookies ...*http.Cookie) Httper + func (h *HttpClient) WithHeader(key string, value interface{}) Httper + func (h *HttpClient) WithHeaders(header lib.InRow) Httper + func (h *HttpClient) WithOption(key int, value interface{}) Httper + func (h *HttpClient) WithOptions(options lib.IntRow) Httper + func (h *HttpClient) WithProxy(proto int, host, port string) Httper + func (h *HttpClient) WithRequestBefore(fun RequestBeforeFunc) Httper + func (h *HttpClient) WithSSL(certpemPath, keypemPath, rootcaName string) Httper + func (h *HttpClient) WithTimeOut(timeout int) Httper + type HttpResponse struct + BodyByte []byte + Code int + Dump string + Err string + Header http.Header + func (h *HttpResponse) Body() string + func (h *HttpResponse) String() string + type Httper interface + Connect func(url string, values lib.InRow) *HttpResponse + Delete func(url string, values lib.InRow) *HttpResponse + Get func(url string, values lib.InRow) *HttpResponse + Head func(url string) *HttpResponse + Options func(url string, values lib.InRow) *HttpResponse + Patch func(url string, values lib.InRow) *HttpResponse + Post func(url string, values lib.InRow) *HttpResponse + PostJson func(url string, value interface{}) *HttpResponse + PostMultipart func(url string, values lib.InRow) *HttpResponse + PostXml func(url string, value interface{}) *HttpResponse + Put func(url string, values lib.InRow) *HttpResponse + Trace func(url string, values lib.InRow) *HttpResponse + WithCookie func(cookies ...*http.Cookie) Httper + WithHeader func(key string, value interface{}) Httper + WithHeaders func(header lib.InRow) Httper + WithOption func(key int, value interface{}) Httper + WithOptions func(options lib.IntRow) Httper + WithProxy func(proto int, host, port string) Httper + WithRequestBefore func(fun RequestBeforeFunc) Httper + WithSSL func(certpemPath, keypemPath, rootcaName string) Httper + WithTimeOut func(timeout int) Httper + type RequestBeforeFunc func(*http.Request)