download

package
v4.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyURLTransformer

func ApplyURLTransformer(urlTransformer URLTransformer, baseURLs ...string) ([]string, error)

func Bytes

func Bytes(ctx context.Context, url string, display func(string), checker ResponseChecker, requestOptions ...RequestOption) ([]byte, error)

func JSON

func JSON(ctx context.Context, url string, display func(string), checker ResponseChecker, requestOptions ...RequestOption) (any, error)

func NoCheck

func NoCheck(*http.Response) error

func NoDisplay

func NoDisplay(string)

func NoTransform

func NoTransform(value string) (string, error)

Types

type RequestOption

type RequestOption = func(*http.Request)

func WithBasicAuth

func WithBasicAuth(username string, password string) RequestOption

type ResponseChecker

type ResponseChecker = func(*http.Response) error

type URLTransformer

type URLTransformer = func(string) (string, error)

func NewURLTransformer

func NewURLTransformer(prevBaseURL string, baseURL string) URLTransformer

Jump to

Keyboard shortcuts

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