httpclient

package
v0.0.0-...-6593370 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2017 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func CreateDefaultClient

func CreateDefaultClient(certPool *x509.CertPool) *http.Client

func CreateDefaultClientInsecureSkipVerify

func CreateDefaultClientInsecureSkipVerify() *http.Client

Types

type Client

type Client interface {
	Do(*http.Request) (*http.Response, error)
}

type DialFunc

type DialFunc func(network, address string) (net.Conn, error)

func SOCKS5DialFuncFromEnvironment

func SOCKS5DialFuncFromEnvironment(origDialer DialFunc) DialFunc

func (DialFunc) Dial

func (f DialFunc) Dial(network, address string) (net.Conn, error)

type HTTPClient

type HTTPClient interface {
	Post(endpoint string, payload []byte) (*http.Response, error)
	PostCustomized(endpoint string, payload []byte, f func(*http.Request)) (*http.Response, error)

	Put(endpoint string, payload []byte) (*http.Response, error)
	PutCustomized(endpoint string, payload []byte, f func(*http.Request)) (*http.Response, error)

	Get(endpoint string) (*http.Response, error)
	GetCustomized(endpoint string, f func(*http.Request)) (*http.Response, error)

	Delete(endpoint string) (*http.Response, error)
	DeleteCustomized(endpoint string, f func(*http.Request)) (*http.Response, error)
}

func NewHTTPClient

func NewHTTPClient(client Client, logger boshlog.Logger) HTTPClient

func NewHTTPClientOpts

func NewHTTPClientOpts(client Client, logger boshlog.Logger, opts Opts) HTTPClient

type Opts

type Opts struct {
	NoRedactUrlQuery bool
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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