Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockTransport ¶
type MockTransport struct {
// contains filtered or unexported fields
}
MockTransport implements http.RoundTripper, which fulfills single http requests issued by an http.Client. This implementation doesn't actually make the call, instead defering to the registered list of responders.
func (*MockTransport) RegisterResponder ¶
func (m *MockTransport) RegisterResponder(method, url string, responder Responder)
RegisterResponder adds a new responder, associated with a given HTTP method and URL. When a request comes in that matches, the responder will be called and the response returned to the client.
Click to show internal directories.
Click to hide internal directories.