Skip to content

About

Fake RoundTripper for go "net/http".

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

fakeroundtripper

-- import "github.com/bigdrum/fakeroundtripper"

Usage

type FakeRoundTripper

type FakeRoundTripper struct {
}

FakeRoundTripper for unitests.

func New

func New() *FakeRoundTripper

New creates a new FakeRoundTripper.

func (*FakeRoundTripper) BindContent

func (f *FakeRoundTripper) BindContent(url string, content string)

BindContent binds the content of a string to a URL.

func (*FakeRoundTripper) BindFile

func (f *FakeRoundTripper) BindFile(url string, testDataFileName string)

BindFile binds the content of a file to a URL.

func (*FakeRoundTripper) BindHandler

func (f *FakeRoundTripper) BindHandler(prefix string, handler http.Handler)

BindHandler binds a handler to a URL.

func (*FakeRoundTripper) RoundTrip

func (f *FakeRoundTripper) RoundTrip(req *http.Request) (*http.Response, error)

RoundTrip implementation.

About

Fake RoundTripper for go "net/http".

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages