net

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrorURLNotFound = errors.New("URL not found")

Functions

func Download

func Download(url string, filepath string) error

func GetHTTPClient added in v0.0.2

func GetHTTPClient() (*http.Client, error)

GetHTTPClient returns a new HTTP client.

func GetJSON added in v0.0.2

func GetJSON[T any](url string, target *T) error

GetJSON retreaves the HTTP content and decodes it into the passed target.

func GetOAuthClient

func GetOAuthClient(ctx context.Context, token string) *http.Client

func PrintHTTPResponse

func PrintHTTPResponse(resp *http.Response)

Types

This section is empty.

Jump to

Keyboard shortcuts

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