httpt

package
v1.31.2 Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TestServer

func TestServer(t *test.Test, handler http.Handler, opts ...httpcli.Option) (*httptest.Server, *httpcli.Client)

Types

type MockServer

type MockServer struct {
	Wrapper endpoint.Wrapper
	// contains filtered or unexported fields
}

func NewMock

func NewMock(t *test.Test) *MockServer

func (*MockServer) BaseURL

func (m *MockServer) BaseURL() string

func (*MockServer) Client

func (m *MockServer) Client(opts ...httpcli.Option) *httpcli.Client

func (*MockServer) GET

func (m *MockServer) GET(path string, handler any) *MockServer

func (*MockServer) Mock

func (m *MockServer) Mock(method string, path string, handler any) *MockServer

func (*MockServer) POST

func (m *MockServer) POST(path string, handler any) *MockServer

Jump to

Keyboard shortcuts

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