httputils

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2025 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRetryableClient

func NewRetryableClient() *http.Client

NewRetryableClient creates a new http client with retryablehttp.Client as transport

Types

type RFC7232HttpClient

type RFC7232HttpClient struct {
	// contains filtered or unexported fields
}

RFC7232HttpClient is a custom client with support for RFC7232 conditional headers

func NewRfc7232HttpClient

func NewRfc7232HttpClient() *RFC7232HttpClient

NewRfc7232HttpClient initializes a new RFC7232HttpClient using the NewRetryableClient function

func (*RFC7232HttpClient) GetWithCondition

func (hc *RFC7232HttpClient) GetWithCondition(url string, etag string, lastModified time.Time) (*http.Response, error)

GetWithCondition reads a file from an HTTP endpoint using conditional headers

func (*RFC7232HttpClient) ReadRemoteOrCached

func (hc *RFC7232HttpClient) ReadRemoteOrCached(url string) (io.ReadCloser, error)

Jump to

Keyboard shortcuts

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