Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewHTTPClient ¶
NewHTTPClient creates new HTTPClient.
Types ¶
type Client ¶
type Client struct { Timeout Duration `yaml:"timeout"` // default is zero (no timeout) must be tuned by modules NotFollowRedirect bool `yaml:"not_follow_redirects"` // default is follow TLSSkipVerify bool `yaml:"tls_skip_verify"` // default is verify ProxyURL string `yaml:"proxy_url"` }
Client is a struct that contains the fields that are needed fore creating HTTPClient.
type Duration ¶
Duration is a time.Duration wrapper
func (*Duration) UnmarshalYAML ¶
UnmarshalYAML implements yaml.Unmarshaler
type Request ¶
type Request struct { URI string `yaml:"-"` URL string `yaml:"url" validate:"required,url"` Body string `yaml:"body"` Method string `yaml:"method" validate:"isdefault|oneof=GET POST HEAD PUT BATCH"` Headers map[string]string `yaml:"headers"` Username string `yaml:"username"` Password string `yaml:"password"` ProxyUsername string `yaml:"proxy_username"` ProxyPassword string `yaml:"proxy_password"` }
Request is a struct that contains the fields that are needed to newHTTPClient *http.Request.
Click to show internal directories.
Click to hide internal directories.