httpclient

package
v0.20.1 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTPClient

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

HTTPClient interface to define the contract of ALL http client to be used (http package or mocks)

type MockClient added in v0.19.0

type MockClient struct {
	DoFunc func(req *http.Request) (*http.Response, error)
}

MockClient is a stub implementation of an http.Client with a custom `Do` method

func (*MockClient) Do added in v0.19.0

func (m *MockClient) Do(req *http.Request) (*http.Response, error)

Do is the mock client's `Do` function that you can customize

Jump to

Keyboard shortcuts

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