Documentation ¶
Index ¶
- Constants
- func GetTransport(opts ...func(*http.Transport) error) (*http.Transport, error)
- func New() venom.Executor
- func WithProxyFromEnv() func(*http.Transport) error
- func WithTLSClientAuth(cert tls.Certificate) func(*http.Transport) error
- func WithTLSInsecureSkipVerify(v bool) func(*http.Transport) error
- func WithTLSRootCA(ctx context.Context, caCert []byte) func(*http.Transport) error
- type Executor
- type HTTPRequest
- type Headers
- type Result
Constants ¶
View Source
const Name = "http"
Name of executor
Variables ¶
This section is empty.
Functions ¶
func GetTransport ¶ added in v1.0.0
func WithProxyFromEnv ¶ added in v1.0.0
func WithTLSClientAuth ¶ added in v1.0.0
func WithTLSClientAuth(cert tls.Certificate) func(*http.Transport) error
func WithTLSInsecureSkipVerify ¶ added in v1.0.0
Types ¶
type Executor ¶
type Executor struct { Method string `json:"method" yaml:"method"` URL string `json:"url" yaml:"url"` Path string `json:"path" yaml:"path"` QueryParameters map[string]string `json:"query_parameters" yaml:"query_parameters" mapstructure:"query_parameters"` Body string `json:"body" yaml:"body"` BodyFile string `json:"bodyfile" yaml:"bodyfile"` PreserveBodyFile bool `json:"preserve_bodyfile" yaml:"preserve_bodyfile" mapstructure:"preserve_bodyfile"` MultipartForm interface{} `json:"multipart_form" yaml:"multipart_form"` Headers Headers `json:"headers" yaml:"headers"` IgnoreVerifySSL bool `json:"ignore_verify_ssl" yaml:"ignore_verify_ssl" mapstructure:"ignore_verify_ssl"` BasicAuthUser string `json:"basic_auth_user" yaml:"basic_auth_user" mapstructure:"basic_auth_user"` BasicAuthPassword string `json:"basic_auth_password" yaml:"basic_auth_password" mapstructure:"basic_auth_password"` SkipHeaders bool `json:"skip_headers" yaml:"skip_headers" mapstructure:"skip_headers"` SkipBody bool `json:"skip_body" yaml:"skip_body" mapstructure:"skip_body"` Proxy string `json:"proxy" yaml:"proxy" mapstructure:"proxy"` Resolve []string `json:"resolve" yaml:"resolve" mapstructure:"resolve"` NoFollowRedirect bool `json:"no_follow_redirect" yaml:"no_follow_redirect" mapstructure:"no_follow_redirect"` UnixSock string `json:"unix_sock" yaml:"unix_sock" mapstructure:"unix_sock"` TLSClientCert string `json:"tls_client_cert" yaml:"tls_client_cert" mapstructure:"tls_client_cert"` TLSClientKey string `json:"tls_client_key" yaml:"tls_client_key" mapstructure:"tls_client_key"` TLSRootCA string `json:"tls_root_ca" yaml:"tls_root_ca" mapstructure:"tls_root_ca"` }
Executor struct. Json and yaml descriptor are used for json output
func (Executor) GetDefaultAssertions ¶
func (Executor) GetDefaultAssertions() *venom.StepAssertions
GetDefaultAssertions return default assertions for this executor
func (Executor) TLSOptions ¶ added in v1.1.0
func (Executor) ZeroValueResult ¶ added in v0.17.0
func (Executor) ZeroValueResult() interface{}
ZeroValueResult return an empty implementation of this executor result
type HTTPRequest ¶ added in v1.0.0
type Result ¶
type Result struct { TimeSeconds float64 `json:"timeseconds,omitempty" yaml:"timeseconds,omitempty"` StatusCode int `json:"statuscode,omitempty" yaml:"statuscode,omitempty"` Request HTTPRequest `json:"request,omitempty" yaml:"request,omitempty"` Body string `json:"body,omitempty" yaml:"body,omitempty"` BodyJSON interface{} `json:"bodyjson,omitempty" yaml:"bodyjson,omitempty"` Headers Headers `json:"headers,omitempty" yaml:"headers,omitempty"` Err string `json:"err,omitempty" yaml:"err,omitempty"` }
Result represents a step result. Json and yaml descriptor are used for json output
Click to show internal directories.
Click to hide internal directories.