Documentation ¶
Index ¶
Constants ¶
View Source
const ( MIMEApplicationJSON = "application/json" MIMEApplicationForm = "application/x-www-form-urlencoded" )
View Source
const Version = "0.4.0"
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 // Qps specifies the highest value for a fixed benchmark, but the real qps // may lower than it Qps 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 // Http2 if true, will use http2 for fasthttp Http2 bool // contains filtered or unexported fields }
Config holds httpit settings
Source Files ¶
Click to show internal directories.
Click to hide internal directories.