fetch

package
v1.3.6 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2023 License: GPL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Request

type Request struct {
	Body        []byte
	BodyUsed    bool
	Cache       string
	Credentials string
	Destination string
	Headers     map[string]string
	Integrity   string
	Method      string
	Mode        string
	Priority    string
	Redirect    string
	Referrer    string
	URL         string
}

func (*Request) Object

func (f *Request) Object() js.Value

func (*Request) SetHeader

func (f *Request) SetHeader(key, value string)

type Response

type Response struct {
	Body       []byte
	Headers    map[string]string
	StatusCode int
}

func Fetch

func Fetch(options *Request) (*Response, error)

TinyGO fetch request implementation.

func (*Response) JSONList

func (r *Response) JSONList() ([]interface{}, bool)

func (*Response) JSONMap

func (r *Response) JSONMap() (map[string]interface{}, bool)

Jump to

Keyboard shortcuts

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