httpClient

package
v0.0.0-...-3ee9fc4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 11, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TraceID      = "trace_id"
	TestID       = "test_id"
	ShouldWait   = "should_wait"
	VariableName = "variable_name"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTPResponse

type HTTPResponse struct {
	*k6HTTP.Response `js:"-"`
	TraceID          string
}

type HttpClient

type HttpClient struct {
	// contains filtered or unexported fields
}

func New

func New(vu modules.VU) *HttpClient

func (*HttpClient) Constructor

func (h *HttpClient) Constructor(call goja.ConstructorCall) *goja.Object

func (*HttpClient) Del

func (c *HttpClient) Del(url goja.Value, args ...goja.Value) (*HTTPResponse, error)

func (*HttpClient) Get

func (c *HttpClient) Get(url goja.Value, args ...goja.Value) (*HTTPResponse, error)

func (*HttpClient) Head

func (c *HttpClient) Head(url goja.Value, args ...goja.Value) (*HTTPResponse, error)

func (*HttpClient) Options

func (c *HttpClient) Options(url goja.Value, args ...goja.Value) (*HTTPResponse, error)

func (*HttpClient) Patch

func (c *HttpClient) Patch(url goja.Value, args ...goja.Value) (*HTTPResponse, error)

func (*HttpClient) Post

func (c *HttpClient) Post(url goja.Value, args ...goja.Value) (*HTTPResponse, error)

func (*HttpClient) Put

func (c *HttpClient) Put(url goja.Value, args ...goja.Value) (*HTTPResponse, error)

func (*HttpClient) WithTrace

func (c *HttpClient) WithTrace(fn HttpFunc, url goja.Value, args ...goja.Value) (*HTTPResponse, error)

type HttpFunc

type HttpFunc func(ctx context.Context, url goja.Value, args ...goja.Value) (*k6HTTP.Response, error)

type HttpRequestFunc

type HttpRequestFunc func(method string, url goja.Value, args ...goja.Value) (*k6HTTP.Response, error)

type NewFunc

type NewFunc func(call goja.ConstructorCall) *goja.Object

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL