Versions in this module Expand all Collapse all v0 v0.0.1 Jun 8, 2020 Changes in this version + var DefaultClient = &http.Client + var DefaultMaxRedirects = 5 + var ErrMaxRedirectsExceeded = errors.New("max redirects exceeded") + var ErrTimeoutExceeded = errors.New("timeout exceeded") + func WithTraces(ctx context.Context, traces *[]Trace) context.Context + type Response interface + BodySize func() int + Header func() http.Header + HeaderSize func() int + Redirects func() int + Stats func() *Stats + Status func() int + TLS func() bool + TimeConnect func() time.Duration + TimeDNS func() time.Duration + TimeDownload func(time.Time) time.Duration + TimeRedirects func() time.Duration + TimeResponse func(time.Time) time.Duration + TimeTLS func() time.Duration + TimeTotal func(time.Time) time.Duration + TimeTotalWithRedirects func(time.Time) time.Duration + TimeWait func() time.Duration + Traces func() []Trace + func Request(method, uri string, header http.Header, body io.Reader) (Response, error) + func RequestWithClient(client *http.Client, method, uri string, header http.Header, body io.Reader) (Response, error) + type Stats struct + BodySize int + Header http.Header + HeaderSize int + Redirects int + Status int + TLS bool + TimeConnect time.Duration + TimeDNS time.Duration + TimeDownload time.Duration + TimeRedirects time.Duration + TimeResponse time.Duration + TimeTLS time.Duration + TimeTotal time.Duration + TimeTotalWithRedirects time.Duration + TimeWait time.Duration + Traces []*Stats + type Trace interface + Address func() string + Start func() time.Time + Stats func() *Stats + TLS func() bool + TimeConnect func() time.Duration + TimeDNS func() time.Duration + TimeDownload func(time.Time) time.Duration + TimeResponse func(time.Time) time.Duration + TimeTLS func() time.Duration + TimeTotal func(time.Time) time.Duration + TimeWait func() time.Duration