http3

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2023 License: AGPL-3.0 Imports: 36 Imported by: 0

README

xk6-http3

This is an experiment to implement http3 client as an extension for k6.

Build

xk6 build --with github.com/bandorko/xk6-http3

Usage

Usage of the extension is similar to the k6/http extension

Example
import http3 from 'k6/x/http3'

export default function(){
  let resp = http3.get("https://www.google.com/")
  console.log(resp);
}

QLOG

You can generate the http3 qlog file with the HTTP3_QLOG=1 environment variable

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrBatchForbiddenInInitContext = common.NewInitContextError("Using batch in the init context is not supported")

ErrBatchForbiddenInInitContext is used when batch was made in the init context

View Source
var ErrHTTPForbiddenInInitContext = common.NewInitContextError("Making http requests in the init context is not supported")

ErrHTTPForbiddenInInitContext is used when a http requests was made in the init context

Functions

This section is empty.

Types

type Client

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

func (*Client) Request

func (c *Client) Request(method string, url goja.Value, args ...goja.Value) (*Response, error)

Request makes an http request of the provided `method` and returns a corresponding response by taking goja.Values as arguments

type FileData

type FileData struct {
	Data        []byte
	Filename    string
	ContentType string
}

FileData represents a binary file requiring multipart request encoding

type ModuleInstance

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

func (*ModuleInstance) Exports

func (mi *ModuleInstance) Exports() modules.Exports

type Response

type Response struct {
	*httpext.Response `js:"-"`
	// contains filtered or unexported fields
}

type RootModule

type RootModule struct{}

func New

func New() *RootModule

func (*RootModule) NewModuleInstance

func (*RootModule) NewModuleInstance(vu modules.VU) modules.Instance

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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