Documentation ¶
Index ¶
Constants ¶
View Source
const ( // DefaultRedirects is the default number of times an Attacker follows // redirects. DefaultRedirects = 10 // DefaultTimeout is the default amount of time an Attacker waits for a request // before it times out. DefaultTimeout = 30 * time.Second // DefaultConnections is the default amount of max open idle connections per // target host. DefaultConnections = 10000 // DefaultMaxConnections is the default amount of connections per target // host. DefaultMaxConnections = 0 // DefaultWorkers is the default initial number of workers used to carry an attack. DefaultWorkers = 10 // DefaultMaxWorkers is the default maximum number of workers used to carry an attack. DefaultMaxWorkers = math.MaxUint64 // DefaultMaxBody is the default max number of bytes to be read from response bodies. // Defaults to no limit. DefaultMaxBody = int64(-1) // NoFollow is the value when redirects are not followed but marked successful NoFollow = -1 )
View Source
const ( GET = http.MethodGet POST = http.MethodPost HEAD = http.MethodHead PUT = http.MethodPut PATCH = http.MethodPatch // RFC 5789 DELETE = http.MethodDelete CONNECT = http.MethodConnect OPTIONS = http.MethodOptions TRACE = http.MethodTrace ContentEncoding = "Content-Encoding" LastModified = "Last-Modified" IfModifiedSince = "If-Modified-Since" )
Variables ¶
View Source
var ( TimeZero = time.Unix(0, 0) NotFound = exception.New(http.StatusNotFound, http.StatusText(http.StatusNotFound)) )
View Source
var DefaultRoundTripper http.RoundTripper = &http.Transport{ Proxy: http.ProxyFromEnvironment, DialContext: (&net.Dialer{ Timeout: 30 * time.Second, KeepAlive: 30 * time.Second, }).DialContext, IdleConnTimeout: 30 * time.Second, TLSHandshakeTimeout: 10 * time.Second, ResponseHeaderTimeout: 10 * time.Second, ExpectContinueTimeout: 1 * time.Second, MaxIdleConns: 100, MaxIdleConnsPerHost: DefaultConnections, MaxConnsPerHost: DefaultMaxConnections, }
DefaultRoundTripper is used if no RoundTripper is set in Config.
Functions ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.