httputil

package
Version: v1.6.5 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2021 License: Apache-2.0 Imports: 11 Imported by: 2

Documentation

Overview

Package httputil implements various HTTP operations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckGet

func CheckGet(lg *zap.Logger, u, exp string, retries int, interval time.Duration, stopc chan struct{}) bool

CheckGet retries until HTTP response returns the expected output.

func Download

func Download(lg *zap.Logger, progressWriter io.Writer, downloadURL string, fpath string) error

Download downloads to a file.

func DownloadInsecure added in v1.2.7

func DownloadInsecure(lg *zap.Logger, progressWriter io.Writer, downloadURL string, fpath string) error

DownloadInsecure downloads to a file.

func Read added in v1.0.8

func Read(lg *zap.Logger, progressWriter io.Writer, downloadURL string) (data []byte, err error)

Read downloads the file with progress bar. The progress is written to the writer.

func ReadInsecure added in v1.0.8

func ReadInsecure(lg *zap.Logger, progressWriter io.Writer, downloadURL string) (data []byte, err error)

ReadInsecure downloads the file with progress bar. The progress is written to the writer.

Types

This section is empty.

Jump to

Keyboard shortcuts

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