fetch

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2025 License: MIT Imports: 8 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bootstrap

func Bootstrap[T any](reg js.ClassBuilder[T])

func Configure

func Configure[T any](host js.ScriptEngine[T])

func EncodeJSONBytes

func EncodeJSONBytes[T any](scope js.Scope[T], b []byte) (js.Value[T], error)

func Fetch

func Fetch[T any](info js.CallbackContext[T]) (js.Value[T], error)

Types

type Body

type Body[T any] struct{}

func NewBody

func NewBody[T any](scriptHost js.ScriptEngine[T]) *Body[T]

func (Body[T]) Constructor

func (w Body[T]) Constructor(cbCtx js.CallbackContext[T]) (res js.Value[T], err error)

func (Body[T]) Initialize

func (wrapper Body[T]) Initialize(jsClass js.Class[T])

type Headers added in v0.9.2

type Headers[T any] struct{}

func NewHeaders added in v0.9.2

func NewHeaders[T any](scriptHost js.ScriptEngine[T]) *Headers[T]

func (Headers[T]) Constructor added in v0.9.2

func (w Headers[T]) Constructor(cbCtx js.CallbackContext[T]) (res js.Value[T], err error)

func (Headers[T]) CreateInstance added in v0.9.2

func (w Headers[T]) CreateInstance(
	cbCtx js.CallbackContext[T],
	options ...fetch.HeaderOption,
) (js.Value[T], error)

func (Headers[T]) Initialize added in v0.9.2

func (wrapper Headers[T]) Initialize(jsClass js.Class[T])

type Request

type Request[T any] struct {
	// contains filtered or unexported fields
}

func NewRequest

func NewRequest[T any](scriptHost js.ScriptEngine[T]) *Request[T]

func (Request[T]) Constructor

func (w Request[T]) Constructor(cbCtx js.CallbackContext[T]) (res js.Value[T], err error)

func (Request[T]) CreateInstance

func (w Request[T]) CreateInstance(
	cbCtx js.CallbackContext[T],
	url string,
	options ...fetch.RequestOption,
) (js.Value[T], error)

func (Request[T]) Initialize

func (wrapper Request[T]) Initialize(jsClass js.Class[T])

type Response

type Response[T any] struct {
	// contains filtered or unexported fields
}

func NewResponse

func NewResponse[T any](scriptHost js.ScriptEngine[T]) *Response[T]

func (Response[T]) Constructor

func (wrapper Response[T]) Constructor(cbCtx js.CallbackContext[T]) (js.Value[T], error)

func (Response[T]) Initialize

func (wrapper Response[T]) Initialize(jsClass js.Class[T])

Jump to

Keyboard shortcuts

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