On registers a response for a specific method + path.
(method, path string, status int, body string)
| 93 | |
| 94 | // On registers a response for a specific method + path. |
| 95 | func (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. |
| 100 | func (m *MockAPI) OnWithHeaders(method, path string, status int, body string, headers map[string]string) { |
no outgoing calls