Versions in this module Expand all Collapse all v1 v1.0.2 Oct 12, 2022 Changes in this version + func RequestWithProxy(method, url string, body io.Reader, deadline, dialTimeout time.Duration, ...) ([]byte, int, error) + type Proxy struct + Password string + URL string + UserName string v1.0.1 Mar 28, 2020 Changes in this version + var ContentTypeForm = "application/x-www-form-urlencoded" + var ContentTypeHtml = "text/html; charset=utf-8" + var ContentTypeImg = "image/png" + var ContentTypeJS = "text/javascript" + var ContentTypeJson = "application/json; charset=utf-8" + var ContentTypeTextCss = "text/css; charset=utf-8" + var ContentTypeTextXml = "text/xml" + var ContentTypeXJS = "application/x-javascript" + func BasicAuthRequest(method, url string, body io.Reader, deadline, dialTimeout time.Duration, ...) ([]byte, int, error) + func CookiesGet(url string, deadline, dialTimeout time.Duration, header map[string]string) ([]byte, []*http.Cookie, error) + func GetRequestWithBasicAuth(url string, deadline, dialTimeout time.Duration, username, password string) ([]byte, int, error) + func PatchJSON(url string, data interface{}, deadline, dialTimeout time.Duration) ([]byte, int, error) + func PostForm(url string, data []byte, deadline, dialTimeout time.Duration) ([]byte, int, error) + func PostJSON(url string, data interface{}, deadline, dialTimeout time.Duration) ([]byte, int, error) + func Request(method, url string, body io.Reader, deadline, dialTimeout time.Duration, ...) ([]byte, int, error) + func RequestCookies(method, url string, body io.Reader, deadline, dialTimeout time.Duration, ...) ([]byte, []*http.Cookie, error) + func SimpleDelete(url string, deadline, dialTimeout time.Duration) ([]byte, int, error) + func SimpleGet(url string, deadline, dialTimeout time.Duration) ([]byte, int, error) + func SimplePut(url string, deadline, dialTimeout time.Duration) ([]byte, int, error) + type HttpResponse struct + Code int + Data interface{} + Message string + func NewHttpResponse() *HttpResponse + func (h *HttpResponse) Error(err error) + func (h *HttpResponse) Response(resp http.ResponseWriter) + func (h *HttpResponse) ResponseWithErr(resp http.ResponseWriter, err error) + type RespData struct + Rows interface{} + Total int64