mockhttp

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2017 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClientWithExpectations

func ClientWithExpectations(expectations []HttpExpectation) *http.Client

func NewMockedServer

func NewMockedServer(expectations []HttpExpectation) *httptest.Server

func NewMockedTransport

func NewMockedTransport(server *httptest.Server) *http.Transport

Types

type HttpExpectation

type HttpExpectation struct {
	Expect  string
	Send    string
	Err     error
	Content string
}

Jump to

Keyboard shortcuts

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