MCPcopy Create free account
hub / github.com/cronitorio/cronitor-cli / On

Method On

internal/testutil/mock_api.go:95–97  ·  view source on GitHub ↗

On registers a response for a specific method + path.

(method, path string, status int, body string)

Source from the content-addressed store, hash-verified

93
94// On registers a response for a specific method + path.
95func (m *MockAPI) On(method, path string, status int, body string) {
96 m.routes[method+" "+path] = mockResponse{status: status, body: body}
97}
98
99// OnWithHeaders registers a response with custom headers.
100func (m *MockAPI) OnWithHeaders(method, path string, status int, body string, headers map[string]string) {

Calls

no outgoing calls