Documentation
¶
Index ¶
Constants ¶
View Source
const ( MIMEApplicationJSON = "application/json" MIMEApplicationForm = "application/x-www-form-urlencoded" )
View Source
const Version = "0.2.1"
Version of current httpit
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// Connections indicates how many tcp connections are used concurrently
Connections int
// Count is numbers of request in one benchmark round
Count int
// Duration means benchmark duration, it's ignored if Count is specified
Duration time.Duration
// Timeout indicates socket/request timeout
Timeout time.Duration
// Url is the benchmark target
Url string
// Method is the http method
Method string
// Args can set data handily for form and json request
Args []string
// Headers indicates http headers
Headers []string
// Host can override Host header in request
Host string
// DisableKeepAlives sets Connection header to 'close'
DisableKeepAlives bool
// Body is request body
Body string
// File indicates that read request body from a file
File string
// Stream indicates using stream body
Stream bool
// JSON indicates send a JSON request
JSON bool
// JSON indicates send a Form request
Form bool
// Insecure skips tls verification
Insecure bool
// Cert indicates path to the client's TLS Certificate
Cert string
// Cert indicates path to the client's TLS Certificate private key
Key string
// HttpProxy indicates an http proxy address
HttpProxy string
// SocksProxy indicates an socks proxy address
SocksProxy string
// Pipeline if true, will use fasthttp PipelineClient
Pipeline bool
// Follow if true, follow 30x location redirects in debug mode
Follow bool
// MaxRedirects indicates maximum redirect count of following 30x,
// default is 30 (only works if Follow is true)
MaxRedirects int
// Debug if true, only send request once and show request and response detail
Debug bool
// contains filtered or unexported fields
}
Config holds httpit settings
Click to show internal directories.
Click to hide internal directories.