web

package
v0.0.0-...-004cd70 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2024 License: GPL-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package web provides functionality for dealing with web operations.

Index

Constants

View Source
const Timeout = 10 * time.Second

Timeout is the time it takes before a web request bails out waiting for a request.

Variables

This section is empty.

Functions

func GetFile

func GetFile(filepath string, url string) (err error)

GetFile downloads a file and saves it to a filepath

func NewHTTPRetryClient

func NewHTTPRetryClient() *retryablehttp.Client

NewHTTPRetryClient instantiates a new http client with retries baked in

func ReadJSON

func ReadJSON(url string, target interface{}) error

ReadJSON reads JSON and parses it into your chosen interface pointer

Types

This section is empty.

Jump to

Keyboard shortcuts

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