mockhttp

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 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