fetch

package
v1.0.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	//ErrNotImplemented ErrNotImplemented error
	ErrNotImplemented = errors.New("Browser not implemented Fetch")
	//ErrNotAnEventTarget ErrNotAnEventTarget error
	ErrNotAFetch = errors.New("Object is not a FetchObject")
)

Functions

func GetInterface

func GetInterface() js.Value

GetJSInterface Get the JS Fetch Interface If nil browser doesn't implement it

Types

type Fetch

type Fetch struct {
	promise.Promise
}

Fetch struct

func New

func New(urlfetch string, opts ...interface{}) (Fetch, error)

func NewFetch

func NewFetch(urlfetch string, method string, headers *map[string]interface{}, data *url.Values, handlerResponse func(response.Response, error)) (Fetch, error)

func NewFromJSObject

func NewFromJSObject(obj js.Value) (Fetch, error)

func (Fetch) Fetch

func (f Fetch) Fetch() Fetch

func (Fetch) Then

func (f Fetch) Then(resolve func(response.Response) *promise.Promise, reject func(error)) error

type FetchFrom

type FetchFrom interface {
	Fetch() Fetch
}

Jump to

Keyboard shortcuts

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