helpers

package
v0.59.4 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeJSONBody

func DecodeJSONBody(resp *http.Response, value any) error

func Fetch

func Fetch(ctx context.Context, url string, dst io.Writer) error

func FetchToFile

func FetchToFile(ctx context.Context, url, dst string) error

FetchToFile downloads the file from the given `url` into the specified `dst` file.

func ModifyJSONBody

func ModifyJSONBody(resp *http.Response, value any, fn func() error) error

func ResponseBuffer

func ResponseBuffer(resp *http.Response) (*bytes.Buffer, error)

func ResponseReader

func ResponseReader(resp *http.Response) (io.ReadCloser, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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