web

package
v0.0.0-...-b949d35 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2024 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DownloadFile

func DownloadFile(client *retryablehttp.Client, u, path string) (downloadedFilePath string, err error)

func GetResourceHeaderValue

func GetResourceHeaderValue(client *retryablehttp.Client, url, method, header string, secrets []string) (result string, err error)

GetResourceHeaderValue will make an HTTP request and return the value of the specified header

func GetResponseBody

func GetResponseBody(resp *http.Response) (body []byte, err error)

func MaskSecrets

func MaskSecrets(content string, secret []string) string

func NewHTTPClient

func NewHTTPClient() *retryablehttp.Client

func Request

func Request(c *retryablehttp.Client, url string, method string, inHeaders http.Header, secrets []string, timeout time.Duration) (body []byte, headers http.Header, status int, err error)

func RequestContentDispositionFileName

func RequestContentDispositionFileName(httpClient *retryablehttp.Client, url string, secrets []string) (filename string, err error)

func Resolve

func Resolve(name string) (ip netip.Addr, err error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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