httpclient

package
v0.0.0-...-2ad74da Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2024 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Unwrap

func Unwrap(h HTTPClient) *http.Client

func WrapNative

func WrapNative(hc *http.Client) *wrapped

Types

type HTTPClient

type HTTPClient interface {
	Get(ctx context.Context, url string) (*http.Response, error)
	Post(ctx context.Context, url, contentType string, body io.Reader) (*http.Response, error)
}

HTTPClient makes it easier to mock out goldclient's dependencies on http.Client by representing a smaller interface.

Jump to

Keyboard shortcuts

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