Install & Compatibility
Where this runs
No compatibility data collected yet for this library.
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
httpmock
✓ github.com/jarcoal/httpmock
Mock HTTP responses for testing.
package main
import (
"fmt"
"net/http"
"github.com/jarcoal/httpmock"
)
func main() {
httpmock.Activate()
httpmock.RegisterResponder("GET", "http://example.com", httpmock.NewStringResponder(200, "OK"))
resp, _ := http.Get("http://example.com")
fmt.Println(resp.Status)
}
Debug
Known issues
No known issues recorded.
Upgrade
Version history
1.4.1latest on pkg.go.dev
Audit
Dependencies
No dependency data recorded yet.