mockhttp

package module
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2017 License: Apache-2.0 Imports: 7 Imported by: 0

README

mockhttp

go mock http

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultTransport = NewTransport()
View Source
var (
	ErrServerNotFound = errors.New("server not found")
)

Functions

func ListenAndServe

func ListenAndServe(host string, h http.Handler)

Types

type Transport

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

func NewTransport

func NewTransport() *Transport

func (*Transport) ListenAndServe

func (p *Transport) ListenAndServe(host string, h http.Handler)

func (*Transport) RoundTrip

func (p *Transport) RoundTrip(req *http.Request) (resp *http.Response, err error)

Jump to

Keyboard shortcuts

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