httpfetch

package
v7.2.3 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetBytes

func GetBytes(ctx context.Context, client Doer, requestURL string, headers map[string]string, maxSize int64) ([]byte, error)

GetBytes performs a GET request with the supplied headers, requires a success status, and returns the response body. When maxSize is positive the body is rejected once it exceeds maxSize bytes.

Types

type Doer

type Doer interface {
	Do(*http.Request) (*http.Response, error)
}

Doer abstracts the HTTP client used to execute requests.

Jump to

Keyboard shortcuts

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