Versions in this module Expand all Collapse all v3 v3.0.1 Apr 29, 2023 Changes in this version + var NoBody = noBody + func GetClient() *http.Client + func GetTLSClientConfig() *tls.Config + func SetDefaultClient(c *Client) + type Client struct + AllowGetMethodPayload bool + BaseURL string + Cookies []*http.Cookie + DebugLog bool + FormData urlpkg.Values + Headers http.Header + PathParams map[string]string + QueryParams urlpkg.Values + func AddCommonQueryParam(key, value string) *Client + func AddCommonQueryParams(key string, values ...string) *Client + func AddCommonRetryCondition(condition RetryConditionFunc) *Client + func AddCommonRetryHook(hook RetryHookFunc) *Client + func C() *Client + func ClearCookies() *Client + func DefaultClient() *Client + func DevMode() *Client + func DisableAllowGetMethodPayload() *Client + func DisableAutoDecode() *Client + func DisableAutoReadResponse() *Client + func DisableCompression() *Client + func DisableDebugLog() *Client + func DisableDumpAll() *Client + func DisableForceHttpVersion() *Client + func DisableH2C() *Client + func DisableInsecureSkipVerify() *Client + func DisableKeepAlives() *Client + func DisableTraceAll() *Client + func EnableAllowGetMethodPayload() *Client + func EnableAutoDecode() *Client + func EnableAutoReadResponse() *Client + func EnableCompression() *Client + func EnableDebugLog() *Client + func EnableDumpAll() *Client + func EnableDumpAllAsync() *Client + func EnableDumpAllTo(output io.Writer) *Client + func EnableDumpAllToFile(filename string) *Client + func EnableDumpAllWithoutBody() *Client + func EnableDumpAllWithoutHeader() *Client + func EnableDumpAllWithoutRequest() *Client + func EnableDumpAllWithoutRequestBody() *Client + func EnableDumpAllWithoutResponse() *Client + func EnableDumpAllWithoutResponseBody() *Client + func EnableDumpEachRequest() *Client + func EnableDumpEachRequestWithoutBody() *Client + func EnableDumpEachRequestWithoutHeader() *Client + func EnableDumpEachRequestWithoutRequest() *Client + func EnableDumpEachRequestWithoutRequestBody() *Client + func EnableDumpEachRequestWithoutResponse() *Client + func EnableDumpEachRequestWithoutResponseBody() *Client + func EnableForceHTTP1() *Client + func EnableForceHTTP2() *Client + func EnableForceHTTP3() *Client + func EnableH2C() *Client + func EnableHTTP3() *Client + func EnableInsecureSkipVerify() *Client + func EnableKeepAlives() *Client + func EnableTraceAll() *Client + func NewClient() *Client + func OnAfterResponse(m ResponseMiddleware) *Client + func OnBeforeRequest(m RequestMiddleware) *Client + func SetAutoDecodeAllContentType() *Client + func SetAutoDecodeContentType(contentTypes ...string) *Client + func SetAutoDecodeContentTypeFunc(fn func(contentType string) bool) *Client + func SetBaseURL(u string) *Client + func SetCertFromFile(certFile, keyFile string) *Client + func SetCerts(certs ...tls.Certificate) *Client + func SetCommonBasicAuth(username, password string) *Client + func SetCommonBearerAuthToken(token string) *Client + func SetCommonContentType(ct string) *Client + func SetCommonCookies(cookies ...*http.Cookie) *Client + func SetCommonDumpOptions(opt *DumpOptions) *Client + func SetCommonError(err interface{}) *Client + func SetCommonErrorResult(err interface{}) *Client + func SetCommonFormData(data map[string]string) *Client + func SetCommonFormDataFromValues(data url.Values) *Client + func SetCommonHeader(key, value string) *Client + func SetCommonHeaders(hdrs map[string]string) *Client + func SetCommonPathParam(key, value string) *Client + func SetCommonPathParams(pathParams map[string]string) *Client + func SetCommonQueryParam(key, value string) *Client + func SetCommonQueryParams(params map[string]string) *Client + func SetCommonQueryString(query string) *Client + func SetCommonRetryBackoffInterval(min, max time.Duration) *Client + func SetCommonRetryCondition(condition RetryConditionFunc) *Client + func SetCommonRetryCount(count int) *Client + func SetCommonRetryFixedInterval(interval time.Duration) *Client + func SetCommonRetryHook(hook RetryHookFunc) *Client + func SetCommonRetryInterval(getRetryIntervalFunc GetRetryIntervalFunc) *Client + func SetCookieJar(jar http.CookieJar) *Client + func SetDial(fn func(ctx context.Context, network, addr string) (net.Conn, error)) *Client + func SetDialTLS(fn func(ctx context.Context, network, addr string) (net.Conn, error)) *Client + func SetJsonMarshal(fn func(v interface{}) ([]byte, error)) *Client + func SetJsonUnmarshal(fn func(data []byte, v interface{}) error) *Client + func SetLogger(log Logger) *Client + func SetOutputDirectory(dir string) *Client + func SetProxy(proxy func(*http.Request) (*url.URL, error)) *Client + func SetProxyURL(proxyUrl string) *Client + func SetRedirectPolicy(policies ...RedirectPolicy) *Client + func SetResponseBodyTransformer(...) *Client + func SetResultStateCheckFunc(fn func(resp *Response) ResultState) *Client + func SetRootCertFromString(pemContent string) *Client + func SetRootCertsFromFile(pemFiles ...string) *Client + func SetScheme(scheme string) *Client + func SetTLSClientConfig(conf *tls.Config) *Client + func SetTLSHandshakeTimeout(timeout time.Duration) *Client + func SetTimeout(d time.Duration) *Client + func SetUnixSocket(file string) *Client + func SetUserAgent(userAgent string) *Client + func SetXmlMarshal(fn func(v interface{}) ([]byte, error)) *Client + func SetXmlUnmarshal(fn func(data []byte, v interface{}) error) *Client + func WrapRoundTrip(wrappers ...RoundTripWrapper) *Client + func WrapRoundTripFunc(funcs ...RoundTripWrapperFunc) *Client + func (c *Client) AddCommonQueryParam(key, value string) *Client + func (c *Client) AddCommonQueryParams(key string, values ...string) *Client + func (c *Client) AddCommonRetryCondition(condition RetryConditionFunc) *Client + func (c *Client) AddCommonRetryHook(hook RetryHookFunc) *Client + func (c *Client) ClearCookies() *Client + func (c *Client) Clone() *Client + func (c *Client) Delete(url ...string) *Request + func (c *Client) DevMode() *Client + func (c *Client) DisableAllowGetMethodPayload() *Client + func (c *Client) DisableAutoDecode() *Client + func (c *Client) DisableAutoReadResponse() *Client + func (c *Client) DisableCompression() *Client + func (c *Client) DisableDebugLog() *Client + func (c *Client) DisableDumpAll() *Client + func (c *Client) DisableForceHttpVersion() *Client + func (c *Client) DisableH2C() *Client + func (c *Client) DisableHTTP3() *Client + func (c *Client) DisableInsecureSkipVerify() *Client + func (c *Client) DisableKeepAlives() *Client + func (c *Client) DisableTraceAll() *Client + func (c *Client) EnableAllowGetMethodPayload() *Client + func (c *Client) EnableAutoDecode() *Client + func (c *Client) EnableAutoReadResponse() *Client + func (c *Client) EnableCompression() *Client + func (c *Client) EnableDebugLog() *Client + func (c *Client) EnableDumpAll() *Client + func (c *Client) EnableDumpAllAsync() *Client + func (c *Client) EnableDumpAllTo(output io.Writer) *Client + func (c *Client) EnableDumpAllToFile(filename string) *Client + func (c *Client) EnableDumpAllWithoutBody() *Client + func (c *Client) EnableDumpAllWithoutHeader() *Client + func (c *Client) EnableDumpAllWithoutRequest() *Client + func (c *Client) EnableDumpAllWithoutRequestBody() *Client + func (c *Client) EnableDumpAllWithoutResponse() *Client + func (c *Client) EnableDumpAllWithoutResponseBody() *Client + func (c *Client) EnableDumpEachRequest() *Client + func (c *Client) EnableDumpEachRequestWithoutBody() *Client + func (c *Client) EnableDumpEachRequestWithoutHeader() *Client + func (c *Client) EnableDumpEachRequestWithoutRequest() *Client + func (c *Client) EnableDumpEachRequestWithoutRequestBody() *Client + func (c *Client) EnableDumpEachRequestWithoutResponse() *Client + func (c *Client) EnableDumpEachRequestWithoutResponseBody() *Client + func (c *Client) EnableForceHTTP1() *Client + func (c *Client) EnableForceHTTP2() *Client + func (c *Client) EnableForceHTTP3() *Client + func (c *Client) EnableH2C() *Client + func (c *Client) EnableHTTP3() *Client + func (c *Client) EnableInsecureSkipVerify() *Client + func (c *Client) EnableKeepAlives() *Client + func (c *Client) EnableTraceAll() *Client + func (c *Client) Get(url ...string) *Request + func (c *Client) GetClient() *http.Client + func (c *Client) GetLogger() Logger + func (c *Client) GetTLSClientConfig() *tls.Config + func (c *Client) GetTransport() *Transport + func (c *Client) Head(url ...string) *Request + func (c *Client) NewParallelDownload(url string) *ParallelDownload + func (c *Client) NewRequest() *Request + func (c *Client) OnAfterResponse(m ResponseMiddleware) *Client + func (c *Client) OnBeforeRequest(m RequestMiddleware) *Client + func (c *Client) Options(url ...string) *Request + func (c *Client) Patch(url ...string) *Request + func (c *Client) Post(url ...string) *Request + func (c *Client) Put(url ...string) *Request + func (c *Client) R() *Request + func (c *Client) SetAutoDecodeAllContentType() *Client + func (c *Client) SetAutoDecodeContentType(contentTypes ...string) *Client + func (c *Client) SetAutoDecodeContentTypeFunc(fn func(contentType string) bool) *Client + func (c *Client) SetBaseURL(u string) *Client + func (c *Client) SetCertFromFile(certFile, keyFile string) *Client + func (c *Client) SetCerts(certs ...tls.Certificate) *Client + func (c *Client) SetCommonBasicAuth(username, password string) *Client + func (c *Client) SetCommonBearerAuthToken(token string) *Client + func (c *Client) SetCommonContentType(ct string) *Client + func (c *Client) SetCommonCookies(cookies ...*http.Cookie) *Client + func (c *Client) SetCommonDumpOptions(opt *DumpOptions) *Client + func (c *Client) SetCommonError(err interface{}) *Client + func (c *Client) SetCommonErrorResult(err interface{}) *Client + func (c *Client) SetCommonFormData(data map[string]string) *Client + func (c *Client) SetCommonFormDataFromValues(data urlpkg.Values) *Client + func (c *Client) SetCommonHeader(key, value string) *Client + func (c *Client) SetCommonHeaderNonCanonical(key, value string) *Client + func (c *Client) SetCommonHeaders(hdrs map[string]string) *Client + func (c *Client) SetCommonHeadersNonCanonical(hdrs map[string]string) *Client + func (c *Client) SetCommonPathParam(key, value string) *Client + func (c *Client) SetCommonPathParams(pathParams map[string]string) *Client + func (c *Client) SetCommonQueryParam(key, value string) *Client + func (c *Client) SetCommonQueryParams(params map[string]string) *Client + func (c *Client) SetCommonQueryString(query string) *Client + func (c *Client) SetCommonRetryBackoffInterval(min, max time.Duration) *Client + func (c *Client) SetCommonRetryCondition(condition RetryConditionFunc) *Client + func (c *Client) SetCommonRetryCount(count int) *Client + func (c *Client) SetCommonRetryFixedInterval(interval time.Duration) *Client + func (c *Client) SetCommonRetryHook(hook RetryHookFunc) *Client + func (c *Client) SetCommonRetryInterval(getRetryIntervalFunc GetRetryIntervalFunc) *Client + func (c *Client) SetCookieJar(jar http.CookieJar) *Client + func (c *Client) SetDial(fn func(ctx context.Context, network, addr string) (net.Conn, error)) *Client + func (c *Client) SetDialTLS(fn func(ctx context.Context, network, addr string) (net.Conn, error)) *Client + func (c *Client) SetHTTP2MaxHeaderListSize(max uint32) *Client + func (c *Client) SetHTTP2PingTimeout(timeout time.Duration) *Client + func (c *Client) SetHTTP2ReadIdleTimeout(timeout time.Duration) *Client + func (c *Client) SetHTTP2StrictMaxConcurrentStreams(strict bool) *Client + func (c *Client) SetHTTP2WriteByteTimeout(timeout time.Duration) *Client + func (c *Client) SetJsonMarshal(fn func(v interface{}) ([]byte, error)) *Client + func (c *Client) SetJsonUnmarshal(fn func(data []byte, v interface{}) error) *Client + func (c *Client) SetLogger(log Logger) *Client + func (c *Client) SetOutputDirectory(dir string) *Client + func (c *Client) SetProxy(proxy func(*http.Request) (*urlpkg.URL, error)) *Client + func (c *Client) SetProxyURL(proxyUrl string) *Client + func (c *Client) SetRedirectPolicy(policies ...RedirectPolicy) *Client + func (c *Client) SetResponseBodyTransformer(...) *Client + func (c *Client) SetResultStateCheckFunc(fn func(resp *Response) ResultState) *Client + func (c *Client) SetRootCertFromString(pemContent string) *Client + func (c *Client) SetRootCertsFromFile(pemFiles ...string) *Client + func (c *Client) SetScheme(scheme string) *Client + func (c *Client) SetTLSClientConfig(conf *tls.Config) *Client + func (c *Client) SetTLSHandshakeTimeout(timeout time.Duration) *Client + func (c *Client) SetTimeout(d time.Duration) *Client + func (c *Client) SetUnixSocket(file string) *Client + func (c *Client) SetUserAgent(userAgent string) *Client + func (c *Client) SetXmlMarshal(fn func(v interface{}) ([]byte, error)) *Client + func (c *Client) SetXmlUnmarshal(fn func(data []byte, v interface{}) error) *Client + func (c *Client) WrapRoundTrip(wrappers ...RoundTripWrapper) *Client + func (c *Client) WrapRoundTripFunc(funcs ...RoundTripWrapperFunc) *Client + type ContentDisposition struct + func (c *ContentDisposition) Add(key, value string) *ContentDisposition + type DownloadCallback func(info DownloadInfo) + type DownloadInfo struct + DownloadedSize int64 + Response *Response + type DumpOptions struct + Async bool + Output io.Writer + RequestBody bool + RequestBodyOutput io.Writer + RequestHeader bool + RequestHeaderOutput io.Writer + RequestOutput io.Writer + ResponseBody bool + ResponseBodyOutput io.Writer + ResponseHeader bool + ResponseHeaderOutput io.Writer + ResponseOutput io.Writer + func (do *DumpOptions) Clone() *DumpOptions + type FileUpload struct + ContentType string + ExtraContentDisposition *ContentDisposition + FileName string + FileSize int64 + GetFileContent GetContentFunc + ParamName string + type GetContentFunc func() (io.ReadCloser, error) + type GetRetryIntervalFunc func(resp *Response, attempt int) time.Duration + type HttpRoundTripFunc func(req *http.Request) (resp *http.Response, err error) + func (fn HttpRoundTripFunc) RoundTrip(req *http.Request) (*http.Response, error) + type HttpRoundTripWrapper func(rt http.RoundTripper) http.RoundTripper + type HttpRoundTripWrapperFunc func(rt http.RoundTripper) HttpRoundTripFunc + type Logger interface + Debugf func(format string, v ...interface{}) + Errorf func(format string, v ...interface{}) + Warnf func(format string, v ...interface{}) + func NewLogger(output io.Writer, prefix string, flag int) Logger + type ParallelDownload struct + func (pd *ParallelDownload) Do(ctx ...context.Context) error + func (pd *ParallelDownload) SetConcurrency(concurrency int) *ParallelDownload + func (pd *ParallelDownload) SetFileMode(perm os.FileMode) *ParallelDownload + func (pd *ParallelDownload) SetOutput(output io.Writer) *ParallelDownload + func (pd *ParallelDownload) SetOutputFile(filename string) *ParallelDownload + func (pd *ParallelDownload) SetSegmentSize(segmentSize int64) *ParallelDownload + func (pd *ParallelDownload) SetTempRootDir(tempRootDir string) *ParallelDownload + type RedirectPolicy func(req *http.Request, via []*http.Request) error + func AllowedDomainRedirectPolicy(hosts ...string) RedirectPolicy + func AllowedHostRedirectPolicy(hosts ...string) RedirectPolicy + func AlwaysCopyHeaderRedirectPolicy(headers ...string) RedirectPolicy + func MaxRedirectPolicy(noOfRedirect int) RedirectPolicy + func NoRedirectPolicy() RedirectPolicy + func SameDomainRedirectPolicy() RedirectPolicy + func SameHostRedirectPolicy() RedirectPolicy + type Request struct + Body []byte + Cookies []*http.Cookie + Error interface{} + FormData urlpkg.Values + GetBody GetContentFunc + Headers http.Header + Method string + PathParams map[string]string + QueryParams urlpkg.Values + RawRequest *http.Request + RawURL string + Result interface{} + RetryAttempt int + StartTime time.Time + URL *urlpkg.URL + func AddQueryParam(key, value string) *Request + func AddQueryParams(key string, values ...string) *Request + func AddRetryCondition(condition RetryConditionFunc) *Request + func AddRetryHook(hook RetryHookFunc) *Request + func DisableForceChunkedEncoding() *Request + func DisableForceMultipart() *Request + func DisableTrace() *Request + func EnableCloseConnection() *Request + func EnableDump() *Request + func EnableDumpTo(output io.Writer) *Request + func EnableDumpToFile(filename string) *Request + func EnableDumpWithoutBody() *Request + func EnableDumpWithoutHeader() *Request + func EnableDumpWithoutRequest() *Request + func EnableDumpWithoutRequestBody() *Request + func EnableDumpWithoutResponse() *Request + func EnableDumpWithoutResponseBody() *Request + func EnableForceChunkedEncoding() *Request + func EnableForceMultipart() *Request + func EnableTrace() *Request + func NewRequest() *Request + func R() *Request + func SetBasicAuth(username, password string) *Request + func SetBearerAuthToken(token string) *Request + func SetBody(body interface{}) *Request + func SetBodyBytes(body []byte) *Request + func SetBodyJsonBytes(body []byte) *Request + func SetBodyJsonMarshal(v interface{}) *Request + func SetBodyJsonString(body string) *Request + func SetBodyString(body string) *Request + func SetBodyXmlBytes(body []byte) *Request + func SetBodyXmlMarshal(v interface{}) *Request + func SetBodyXmlString(body string) *Request + func SetContentType(contentType string) *Request + func SetContext(ctx context.Context) *Request + func SetCookies(cookies ...*http.Cookie) *Request + func SetDownloadCallback(callback DownloadCallback) *Request + func SetDownloadCallbackWithInterval(callback DownloadCallback, minInterval time.Duration) *Request + func SetDumpOptions(opt *DumpOptions) *Request + func SetError(error interface{}) *Request + func SetErrorResult(error interface{}) *Request + func SetFile(paramName, filePath string) *Request + func SetFileBytes(paramName, filename string, content []byte) *Request + func SetFileReader(paramName, filePath string, reader io.Reader) *Request + func SetFileUpload(f ...FileUpload) *Request + func SetFiles(files map[string]string) *Request + func SetFormData(data map[string]string) *Request + func SetFormDataAnyType(data map[string]interface{}) *Request + func SetFormDataFromValues(data url.Values) *Request + func SetHeader(key, value string) *Request + func SetHeaders(hdrs map[string]string) *Request + func SetOutput(output io.Writer) *Request + func SetOutputFile(file string) *Request + func SetPathParam(key, value string) *Request + func SetPathParams(params map[string]string) *Request + func SetQueryParam(key, value string) *Request + func SetQueryParams(params map[string]string) *Request + func SetQueryParamsAnyType(params map[string]interface{}) *Request + func SetQueryString(query string) *Request + func SetResult(result interface{}) *Request + func SetRetryBackoffInterval(min, max time.Duration) *Request + func SetRetryCondition(condition RetryConditionFunc) *Request + func SetRetryCount(count int) *Request + func SetRetryFixedInterval(interval time.Duration) *Request + func SetRetryHook(hook RetryHookFunc) *Request + func SetRetryInterval(getRetryIntervalFunc GetRetryIntervalFunc) *Request + func SetSuccessResult(result interface{}) *Request + func SetURL(url string) *Request + func SetUploadCallback(callback UploadCallback) *Request + func SetUploadCallbackWithInterval(callback UploadCallback, minInterval time.Duration) *Request + func (r *Request) AddQueryParam(key, value string) *Request + func (r *Request) AddQueryParams(key string, values ...string) *Request + func (r *Request) AddRetryCondition(condition RetryConditionFunc) *Request + func (r *Request) AddRetryHook(hook RetryHookFunc) *Request + func (r *Request) Context() context.Context + func (r *Request) Delete(url string) (*Response, error) + func (r *Request) DisableAutoReadResponse() *Request + func (r *Request) DisableForceChunkedEncoding() *Request + func (r *Request) DisableForceMultipart() *Request + func (r *Request) DisableTrace() *Request + func (r *Request) Do(ctx ...context.Context) *Response + func (r *Request) EnableAutoReadResponse() *Request + func (r *Request) EnableCloseConnection() *Request + func (r *Request) EnableDump() *Request + func (r *Request) EnableDumpTo(output io.Writer) *Request + func (r *Request) EnableDumpToFile(filename string) *Request + func (r *Request) EnableDumpWithoutBody() *Request + func (r *Request) EnableDumpWithoutHeader() *Request + func (r *Request) EnableDumpWithoutRequest() *Request + func (r *Request) EnableDumpWithoutRequestBody() *Request + func (r *Request) EnableDumpWithoutResponse() *Request + func (r *Request) EnableDumpWithoutResponseBody() *Request + func (r *Request) EnableForceChunkedEncoding() *Request + func (r *Request) EnableForceMultipart() *Request + func (r *Request) EnableLogResponseBodySize() *Request + func (r *Request) EnableTrace() *Request + func (r *Request) Get(url string) (*Response, error) + func (r *Request) GetClient() *Client + func (r *Request) Head(url string) (*Response, error) + func (r *Request) HeaderToString() string + func (r *Request) MustDelete(url string) *Response + func (r *Request) MustGet(url string) *Response + func (r *Request) MustHead(url string) *Response + func (r *Request) MustOptions(url string) *Response + func (r *Request) MustPatch(url string) *Response + func (r *Request) MustPost(url string) *Response + func (r *Request) MustPut(url string) *Response + func (r *Request) Options(url string) (*Response, error) + func (r *Request) Patch(url string) (*Response, error) + func (r *Request) Post(url string) (*Response, error) + func (r *Request) Put(url string) (*Response, error) + func (r *Request) Send(method, url string) (*Response, error) + func (r *Request) SetBasicAuth(username, password string) *Request + func (r *Request) SetBearerAuthToken(token string) *Request + func (r *Request) SetBody(body interface{}) *Request + func (r *Request) SetBodyBytes(body []byte) *Request + func (r *Request) SetBodyJsonBytes(body []byte) *Request + func (r *Request) SetBodyJsonMarshal(v interface{}) *Request + func (r *Request) SetBodyJsonString(body string) *Request + func (r *Request) SetBodyString(body string) *Request + func (r *Request) SetBodyXmlBytes(body []byte) *Request + func (r *Request) SetBodyXmlMarshal(v interface{}) *Request + func (r *Request) SetBodyXmlString(body string) *Request + func (r *Request) SetClient(client *Client) *Request + func (r *Request) SetContentType(contentType string) *Request + func (r *Request) SetContext(ctx context.Context) *Request + func (r *Request) SetCookies(cookies ...*http.Cookie) *Request + func (r *Request) SetDownloadCallback(callback DownloadCallback) *Request + func (r *Request) SetDownloadCallbackWithInterval(callback DownloadCallback, minInterval time.Duration) *Request + func (r *Request) SetDumpOptions(opt *DumpOptions) *Request + func (r *Request) SetError(error interface{}) *Request + func (r *Request) SetErrorResult(error interface{}) *Request + func (r *Request) SetFile(paramName, filePath string) *Request + func (r *Request) SetFileBytes(paramName, filename string, content []byte) *Request + func (r *Request) SetFileReader(paramName, filename string, reader io.Reader) *Request + func (r *Request) SetFileUpload(uploads ...FileUpload) *Request + func (r *Request) SetFiles(files map[string]string) *Request + func (r *Request) SetFormData(data map[string]string) *Request + func (r *Request) SetFormDataAnyType(data map[string]interface{}) *Request + func (r *Request) SetFormDataFromValues(data urlpkg.Values) *Request + func (r *Request) SetHeader(key, value string) *Request + func (r *Request) SetHeaderNonCanonical(key, value string) *Request + func (r *Request) SetHeaders(hdrs map[string]string) *Request + func (r *Request) SetHeadersNonCanonical(hdrs map[string]string) *Request + func (r *Request) SetOutput(output io.Writer) *Request + func (r *Request) SetOutputFile(file string) *Request + func (r *Request) SetPathParam(key, value string) *Request + func (r *Request) SetPathParams(params map[string]string) *Request + func (r *Request) SetQueryParam(key, value string) *Request + func (r *Request) SetQueryParams(params map[string]string) *Request + func (r *Request) SetQueryParamsAnyType(params map[string]interface{}) *Request + func (r *Request) SetQueryString(query string) *Request + func (r *Request) SetResult(result interface{}) *Request + func (r *Request) SetRetryBackoffInterval(min, max time.Duration) *Request + func (r *Request) SetRetryCondition(condition RetryConditionFunc) *Request + func (r *Request) SetRetryCount(count int) *Request + func (r *Request) SetRetryFixedInterval(interval time.Duration) *Request + func (r *Request) SetRetryHook(hook RetryHookFunc) *Request + func (r *Request) SetRetryInterval(getRetryIntervalFunc GetRetryIntervalFunc) *Request + func (r *Request) SetSuccessResult(result interface{}) *Request + func (r *Request) SetURL(url string) *Request + func (r *Request) SetUploadCallback(callback UploadCallback) *Request + func (r *Request) SetUploadCallbackWithInterval(callback UploadCallback, minInterval time.Duration) *Request + func (r *Request) TraceInfo() TraceInfo + type RequestMiddleware func(client *Client, req *Request) error + type Response struct + Err error + Request *Request + func Delete(url string) (*Response, error) + func Get(url string) (*Response, error) + func Head(url string) (*Response, error) + func MustDelete(url string) *Response + func MustGet(url string) *Response + func MustHead(url string) *Response + func MustOptions(url string) *Response + func MustPatch(url string) *Response + func MustPost(url string) *Response + func MustPut(url string) *Response + func Options(url string) (*Response, error) + func Patch(url string) (*Response, error) + func Post(url string) (*Response, error) + func Put(url string) (*Response, error) + func (r *Response) Bytes() []byte + func (r *Response) Dump() string + func (r *Response) Error() interface{} + func (r *Response) ErrorResult() interface{} + func (r *Response) GetContentType() string + func (r *Response) GetHeader(key string) string + func (r *Response) GetHeaderValues(key string) []string + func (r *Response) GetStatus() string + func (r *Response) GetStatusCode() int + func (r *Response) HeaderToString() string + func (r *Response) Into(v interface{}) error + func (r *Response) IsError() bool + func (r *Response) IsErrorState() bool + func (r *Response) IsSuccess() bool + func (r *Response) IsSuccessState() bool + func (r *Response) ReceivedAt() time.Time + func (r *Response) Result() interface{} + func (r *Response) ResultState() ResultState + func (r *Response) String() string + func (r *Response) SuccessResult() interface{} + func (r *Response) ToBytes() (body []byte, err error) + func (r *Response) ToString() (string, error) + func (r *Response) TotalTime() time.Duration + func (r *Response) TraceInfo() TraceInfo + func (r *Response) Unmarshal(v interface{}) error + func (r *Response) UnmarshalJson(v interface{}) error + func (r *Response) UnmarshalXml(v interface{}) error + type ResponseMiddleware func(client *Client, resp *Response) error + type ResultState int + const ErrorState + const SuccessState + const UnknownState + type RetryConditionFunc func(resp *Response, err error) bool + type RetryHookFunc func(resp *Response, err error) + type RoundTripFunc func(req *Request) (resp *Response, err error) + func (fn RoundTripFunc) RoundTrip(req *Request) (*Response, error) + type RoundTripWrapper func(rt RoundTripper) RoundTripper + type RoundTripWrapperFunc func(rt RoundTripper) RoundTripFunc + type RoundTripper interface + RoundTrip func(*Request) (*Response, error) + type TraceInfo struct + ConnIdleTime time.Duration + ConnectTime time.Duration + DNSLookupTime time.Duration + FirstResponseTime time.Duration + IsConnReused bool + IsConnWasIdle bool + RemoteAddr net.Addr + ResponseTime time.Duration + TCPConnectTime time.Duration + TLSHandshakeTime time.Duration + TotalTime time.Duration + func (t TraceInfo) Blame() string + func (t TraceInfo) String() string + type Transport struct + func NewTransport() *Transport + func T() *Transport + func (t *Transport) CancelRequest(req *http.Request) + func (t *Transport) Clone() *Transport + func (t *Transport) CloseIdleConnections() + func (t *Transport) DisableAutoDecode() *Transport + func (t *Transport) DisableDump() + func (t *Transport) DisableForceHttpVersion() *Transport + func (t *Transport) DisableH2C() *Transport + func (t *Transport) DisableHTTP3() + func (t *Transport) EnableAutoDecode() *Transport + func (t *Transport) EnableDump(opt *DumpOptions) + func (t *Transport) EnableForceHTTP1() *Transport + func (t *Transport) EnableForceHTTP2() *Transport + func (t *Transport) EnableForceHTTP3() *Transport + func (t *Transport) EnableH2C() *Transport + func (t *Transport) EnableHTTP3() + func (t *Transport) GetMaxIdleConns() int + func (t *Transport) RoundTrip(req *http.Request) (*http.Response, error) + func (t *Transport) RoundTrip(req *http.Request) (resp *http.Response, err error) + func (t *Transport) SetAutoDecodeAllContentType() *Transport + func (t *Transport) SetAutoDecodeContentType(contentTypes ...string) + func (t *Transport) SetAutoDecodeContentTypeFunc(fn func(contentType string) bool) *Transport + func (t *Transport) SetDebug(debugf func(format string, v ...interface{})) *Transport + func (t *Transport) SetDial(fn func(ctx context.Context, network, addr string) (net.Conn, error)) *Transport + func (t *Transport) SetDialTLS(fn func(ctx context.Context, network, addr string) (net.Conn, error)) *Transport + func (t *Transport) SetExpectContinueTimeout(timeout time.Duration) *Transport + func (t *Transport) SetGetProxyConnectHeader(...) *Transport + func (t *Transport) SetHTTP2MaxHeaderListSize(max uint32) *Transport + func (t *Transport) SetHTTP2PingTimeout(timeout time.Duration) *Transport + func (t *Transport) SetHTTP2ReadIdleTimeout(timeout time.Duration) *Transport + func (t *Transport) SetHTTP2StrictMaxConcurrentStreams(strict bool) *Transport + func (t *Transport) SetHTTP2WriteByteTimeout(timeout time.Duration) *Transport + func (t *Transport) SetIdleConnTimeout(timeout time.Duration) *Transport + func (t *Transport) SetMaxConnsPerHost(max int) *Transport + func (t *Transport) SetMaxIdleConns(max int) *Transport + func (t *Transport) SetMaxResponseHeaderBytes(max int64) *Transport + func (t *Transport) SetProxy(proxy func(*http.Request) (*url.URL, error)) *Transport + func (t *Transport) SetProxyConnectHeader(header http.Header) *Transport + func (t *Transport) SetReadBufferSize(size int) *Transport + func (t *Transport) SetResponseHeaderTimeout(timeout time.Duration) *Transport + func (t *Transport) SetTLSClientConfig(cfg *tls.Config) *Transport + func (t *Transport) SetTLSHandshakeTimeout(timeout time.Duration) *Transport + func (t *Transport) SetWriteBufferSize(size int) *Transport + func (t *Transport) WrapRoundTrip(wrappers ...HttpRoundTripWrapper) *Transport + func (t *Transport) WrapRoundTripFunc(funcs ...HttpRoundTripWrapperFunc) *Transport + type UploadCallback func(info UploadInfo) + type UploadInfo struct + FileName string + FileSize int64 + ParamName string + UploadedSize int64