httpmock

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(e *expectation)

func Method

func Method(method string) Option

func Optional

func Optional() Option

func ReqJSON

func ReqJSON(req interface{}) Option

func RespJSON

func RespJSON(resp interface{}) Option

func Status

func Status(status int) Option

type Server

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

func NewServer

func NewServer(tb testing.TB) *Server

func (*Server) Client

func (s *Server) Client() *http.Client

func (*Server) Expect

func (s *Server) Expect(reqURL string, opt ...Option)

func (*Server) Finish

func (s *Server) Finish()

func (*Server) URL

func (s *Server) URL() string

Jump to

Keyboard shortcuts

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