web2

package
v0.0.0-...-13c57f6 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2019 License: BSD-3-Clause Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TraceGET = false

Functions

func CopyHeader

func CopyHeader(hdr http.Header) http.Header

func Get

func Get(url string, options ...Option) error

func SetHTTPDoForTesting

func SetHTTPDoForTesting(do func(*http.Request) (*http.Response, error))

Types

type Option

type Option interface {
	// contains filtered or unexported methods
}

func Body

func Body(body *io.ReadCloser) Option

func DecodeJSON

func DecodeJSON(dst interface{}) Option
func Header(hdr *http.Header) Option

func Non200OK

func Non200OK() Option

func ReadAllBody

func ReadAllBody(body *[]byte) Option

Jump to

Keyboard shortcuts

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