Versions in this module Expand all Collapse all v0 v0.1.4 Aug 28, 2023 Changes in this version type Options + CharsetAutoDetect bool v0.1.3 Aug 22, 2023 Changes in this version + func DecodeResponse(res *http.Response) (*http.Response, error) + func DefaultTemplateFuncMap(cache cloudcat.Cache) template.FuncMap + func NewTemplateRequest(funcs template.FuncMap, tpl string, arg any) (*http.Request, error) type Options + Headers http.Header v0.1.1 Aug 2, 2023 Changes in this version + func NewFetch(opt Options) cloudcat.Fetch v0.1.0 Aug 1, 2023 Changes in this version + const DefaultMaxBodySize + const DefaultRetryTimes + const DefaultTimeout + var DefaultHeaders = map[string]string + var DefaultRetryHTTPCodes = []int + var ErrNoDateHeader = errors.New("no Date header") + func CachedResponse(c cloudcat.Cache, req *http.Request) (resp *http.Response, err error) + func Date(respHeaders http.Header) (date time.Time, err error) + func DecodeReader(encoding string, reader io.Reader) (io.Reader, error) + func DefaultRoundTripper() http.RoundTripper + func DoByte(fetch cloudcat.Fetch, req *http.Request) ([]byte, error) + func DoString(fetch cloudcat.Fetch, req *http.Request) (string, error) + func NewFetcher(opt Options) cloudcat.Fetch + func NewRequest(method, u string, body any, headers map[string]string) (*http.Request, error) + func ProxyFromRequest(req *http.Request) (*url.URL, error) + func WithRoundRobinProxy(ctx context.Context, proxy ...string) context.Context + type CacheTransport struct + Cache cloudcat.Cache + MarkCachedResponses bool + Policy Policy + Transport http.RoundTripper + func NewTransport(c cloudcat.Cache) *CacheTransport + func (t *CacheTransport) RoundTrip(req *http.Request) (resp *http.Response, err error) + func (t *CacheTransport) RoundTripDummy(req *http.Request) (resp *http.Response, err error) + func (t *CacheTransport) RoundTripRFC2616(req *http.Request) (resp *http.Response, err error) + type Options struct + CachePolicy Policy + CharsetDetectDisabled bool + Jar *cookiejar.Jar + MaxBodySize int64 + RetryHTTPCodes []int + RetryTimes int + RoundTripper http.RoundTripper + Timeout time.Duration + type Policy string + const Dummy + const RFC2616 + const XFromCache