package web2

import "cmd/go/internal/web2"

Index

Variables

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

Source Files

web.go

Version
v1.11.13
Published
Aug 13, 2019
Platform
linux/amd64
Imports
14 packages
Last checked
11 seconds ago

Tools for package owners.