httpmock

package
v0.0.0-...-6861ca8 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2018 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultTransport = NewMockTransport()

Functions

func NewRespBodyFromString

func NewRespBodyFromString(body string) io.ReadCloser

Types

type MockTransport

type MockTransport struct {
	// contains filtered or unexported fields
}

func NewMockTransport

func NewMockTransport() *MockTransport

func (*MockTransport) RegisterResponder

func (m *MockTransport) RegisterResponder(method, url string, responder Responder)

func (*MockTransport) RoundTrip

func (m *MockTransport) RoundTrip(req *http.Request) (*http.Response, error)

type Responder

type Responder func(*http.Request) (*http.Response, error)

Jump to

Keyboard shortcuts

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