gock
HTTP traffic mocking and testing made easy in Go
... and bodies. Extensible and pluggable HTTP matching rules. Ability to switch between mock and real networking modes. Ability to filter/map HTTP requests for accurate mock matching. Supports map and filters to handle mocks easily. Wide compatible HTTP interceptor using http.RoundTripper interface. Works with any net/http compatible client, such as gentleman. Network timeout/cancelation delay simulation. Extensible and hackable API. Dependency free.