Documentation ¶
Overview ¶
Package http [allows sending customized http traffic]
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitRequest ¶
func InitRequest(c RequestConfig, req *fasthttp.Request) int64
InitRequest is used to populate data from request config to fasthttp.Request
Types ¶
type ClientConfig ¶
type ClientConfig struct { StaticHost *StaticHostConfig `mapstructure:"static_host"` TLSClientConfig *tls.Config `mapstructure:"tls_config,omitempty"` Timeout *time.Duration `mapstructure:"timeout"` ReadTimeout *time.Duration `mapstructure:"read_timeout"` WriteTimeout *time.Duration `mapstructure:"write_timeout"` IdleTimeout *time.Duration `mapstructure:"idle_timeout"` MaxIdleConns *int `mapstructure:"max_idle_connections"` ProxyURLs string `mapstructure:"proxy_urls"` }
ClientConfig is a http client configuration structure
type RequestConfig ¶
type RequestConfig struct { Path string Method string Body string Headers map[string]string Cookies map[string]string }
RequestConfig is a struct representing the config of a single request
type StaticHostConfig ¶
Click to show internal directories.
Click to hide internal directories.