Versions in this module Expand all Collapse all v0 v0.0.2 Feb 9, 2022 v0.0.1 Feb 8, 2022 Changes in this version + func HttpBuildQuery(queryData url.Values) string + func JoinRawCookie(ck map[string]string) (ret string) + func ParseUrl(str string, component int) (map[string]string, error) + func ProcTime(st, et int64) float64 + func RawUrlDecode(str string) (string, error) + func RawUrlEncode(str string) string + func SplitRawCookie(ck string) (ret map[string]string) + func UrlDecode(str string) (string, error) + func UrlEncode(str string) string + type HttpClient struct + func NewEmptyHttpClient() *HttpClient + func NewHttpClient(httpUrl string, ctx context.Context) *HttpClient + func (ehc *HttpClient) AddCookie(k, v string) *HttpClient + func (ehc *HttpClient) AddCookies(ck map[string]string) *HttpClient + func (ehc *HttpClient) AddField(k, v string) *HttpClient + func (ehc *HttpClient) AddFile(fieldName, filePath, fileName string) *HttpClient + func (ehc *HttpClient) AddHeader(k string, v string) *HttpClient + func (ehc *HttpClient) AddHeaders(hs map[string]string) *HttpClient + func (ehc *HttpClient) Get() (*HttpResponse, error) + func (ehc *HttpClient) GetBuffer() *bytes.Buffer + func (ehc *HttpClient) GetContentType() string + func (ehc *HttpClient) GetHttpTransport() *http.Transport + func (ehc *HttpClient) Head() (*HttpResponse, error) + func (ehc *HttpClient) Post() (*HttpResponse, error) + func (ehc *HttpClient) PostForm() (*HttpResponse, error) + func (ehc *HttpClient) SetAjax() *HttpClient + func (ehc *HttpClient) SetBasicAuth(username, password string) *HttpClient + func (ehc *HttpClient) SetCheckRedirectFunc(policy func(req *http.Request, via []*http.Request) error) *HttpClient + func (ehc *HttpClient) SetContentType(ct string) *HttpClient + func (ehc *HttpClient) SetContentTypeFormUrlEncoded() *HttpClient + func (ehc *HttpClient) SetContentTypeJson() *HttpClient + func (ehc *HttpClient) SetContentTypeOctetStream() *HttpClient + func (ehc *HttpClient) SetCtx(ctx context.Context) *HttpClient + func (ehc *HttpClient) SetField(k, v string) *HttpClient + func (ehc *HttpClient) SetFields(data map[string]string) *HttpClient + func (ehc *HttpClient) SetHeader(k string, v string) *HttpClient + func (ehc *HttpClient) SetHeaders(hs map[string]string) *HttpClient + func (ehc *HttpClient) SetHost(host string) *HttpClient + func (ehc *HttpClient) SetKeepAlive(b bool) *HttpClient + func (ehc *HttpClient) SetProxy(proxyHost string) *HttpClient + func (ehc *HttpClient) SetRawCookie(ck string) *HttpClient + func (ehc *HttpClient) SetRawRequestBody(b []byte) *HttpClient + func (ehc *HttpClient) SetReferer(referer string) *HttpClient + func (ehc *HttpClient) SetRetryTimes(t int) *HttpClient + func (ehc *HttpClient) SetTimeout(t time.Duration) *HttpClient + func (ehc *HttpClient) SetUrl(u string) *HttpClient + func (ehc *HttpClient) SetUserAgent(ua string) *HttpClient + type HttpResponse struct + func NewHttpResponse(resp *http.Response) *HttpResponse + func (tfr HttpResponse) Error() error + func (tfr HttpResponse) GetBody() []byte + func (tfr HttpResponse) GetBodyString() string + func (tfr HttpResponse) GetContentLen() int64 + func (tfr HttpResponse) GetHeader() map[string]string + func (tfr HttpResponse) GetLocation() string + func (tfr HttpResponse) GetProto() string + func (tfr HttpResponse) GetSetCookie() []http.Cookie + func (tfr HttpResponse) GetStatus() string + func (tfr HttpResponse) GetStatusCode() int + func (tfr HttpResponse) GetTransferEncoding() []string + type HttpUploadFile struct + FieldName string + FileName string + FilePath string