Documentation ¶
Index ¶
- func TestServer(t *test.Test, handler http.Handler, opts ...httpcli.Option) (*httptest.Server, *httpcli.Client)
- type MockServer
- func (m *MockServer) BaseURL() string
- func (m *MockServer) Client(opts ...httpcli.Option) *httpcli.Client
- func (m *MockServer) GET(path string, handler any) *MockServer
- func (m *MockServer) Mock(method string, path string, handler any) *MockServer
- func (m *MockServer) POST(path string, handler any) *MockServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type MockServer ¶
func NewMock ¶
func NewMock(t *test.Test) *MockServer
func (*MockServer) BaseURL ¶
func (m *MockServer) BaseURL() string
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
Click to show internal directories.
Click to hide internal directories.