Versions in this module Expand all Collapse all v0 v0.25.1 Aug 13, 2019 Changes in this version + type K6Error struct + Code errCode + Message string + OriginalError error + func NewK6Error(code errCode, msg string, originalErr error) K6Error + func (k6Err K6Error) Error() string + func (k6Err K6Error) Unwrap() error v0.25.0 Jul 31, 2019 Changes in this version + type CompressionType uint + const CompressionTypeBr + const CompressionTypeDeflate + const CompressionTypeGzip + const CompressionTypeZstd + func CompressionTypeString(s string) (CompressionType, error) + func CompressionTypeValues() []CompressionType + func (i CompressionType) IsACompressionType() bool + func (i CompressionType) String() string type ParsedHTTPRequest + Compressions []CompressionType v0.24.0 Mar 20, 2019 Changes in this version + func SetRequestCookies(req *http.Request, jar *cookiejar.Jar, ...) + type HTTPCookie struct + Domain string + Expires int64 + HTTPOnly bool + MaxAge int + Name string + Path string + Secure bool + Value string + type HTTPRequestCookie struct + Name string + Replace bool + Value string + type ParsedHTTPRequest struct + ActiveJar *cookiejar.Jar + Auth string + Body *bytes.Buffer + Cookies map[string]*HTTPRequestCookie + Redirects null.Int + Req *http.Request + ResponseType ResponseType + Tags map[string]string + Throw bool + Timeout time.Duration + URL *URL + type Request struct + Body string + Cookies map[string][]*HTTPRequestCookie + Headers map[string][]string + Method string + URL string + type Response struct + Body interface{} + Cookies map[string][]*HTTPCookie + Error string + ErrorCode int + Headers map[string]string + OCSP netext.OCSP + Proto string + RemoteIP string + RemotePort int + Request Request + Status int + TLSCipherSuite string + TLSVersion string + Timings ResponseTimings + URL string + func MakeRequest(ctx context.Context, preq *ParsedHTTPRequest) (*Response, error) + func (res *Response) GetCtx() context.Context + func (res *Response) JSON(selector ...string) (interface{}, error) + type ResponseTimings struct + Blocked float64 + Connecting float64 + Duration float64 + LookingUp float64 + Receiving float64 + Sending float64 + TLSHandshaking float64 + Waiting float64 + type ResponseType uint + const ResponseTypeBinary + const ResponseTypeNone + const ResponseTypeText + func ResponseTypeString(s string) (ResponseType, error) + func ResponseTypeValues() []ResponseType + func (i *ResponseType) UnmarshalJSON(data []byte) error + func (i *ResponseType) UnmarshalText(text []byte) error + func (i ResponseType) IsAResponseType() bool + func (i ResponseType) MarshalJSON() ([]byte, error) + func (i ResponseType) MarshalText() ([]byte, error) + func (i ResponseType) String() string + type Tracer struct + func (t *Tracer) ConnectDone(network, addr string, err error) + func (t *Tracer) ConnectStart(network, addr string) + func (t *Tracer) Done() *Trail + func (t *Tracer) GetConn(hostPort string) + func (t *Tracer) GotConn(info httptrace.GotConnInfo) + func (t *Tracer) GotFirstResponseByte() + func (t *Tracer) TLSHandshakeDone(state tls.ConnectionState, err error) + func (t *Tracer) TLSHandshakeStart() + func (t *Tracer) Trace() *httptrace.ClientTrace + func (t *Tracer) WroteRequest(info httptrace.WroteRequestInfo) + type Trail struct + Blocked time.Duration + ConnDuration time.Duration + ConnRemoteAddr net.Addr + ConnReused bool + Connecting time.Duration + Duration time.Duration + EndTime time.Time + Errors []error + Receiving time.Duration + Samples []stats.Sample + Sending time.Duration + StartTime time.Time + TLSHandshaking time.Duration + Tags *stats.SampleTags + Waiting time.Duration + func (tr *Trail) GetSamples() []stats.Sample + func (tr *Trail) GetTags() *stats.SampleTags + func (tr *Trail) GetTime() time.Time + func (tr *Trail) SaveSamples(tags *stats.SampleTags) + type URL struct + Name string + URL string + func NewURL(urlString, name string) (URL, error) + func (u URL) GetURL() *url.URL