httpclient

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2016 License: Apache-2.0, Apache-2.0 Imports: 11 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 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)
}

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