fetch

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2023 License: MIT Imports: 6 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client is an HTTP client.

func NewClient

func NewClient() *Client

NewClient returns new Client

func (*Client) Do

func (c *Client) Do(req *Request) (*http.Response, error)

Do sends an HTTP request and returns an HTTP response

type Request

type Request struct {
	*http.Request
}

Request represents an HTTP request and is part of the Fetch API. Docs: https://developers.cloudflare.com/workers/runtime-apis/request/

func NewRequest

func NewRequest(ctx context.Context, method string, url string, body io.Reader) (*Request, error)

NewRequest returns new Request given a method, URL, and optional body

Jump to

Keyboard shortcuts

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