jarcoal/httpmock
HTTP mocking for Golang observed · 2026-08-28
Health v2 · maintenance only
86/100
- Activity 98
- Release rhythm 63
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-02. Adoption (stars, forks) is never an input.
- gap_med: 239.0
- age_days: 4573
- days_rel: 36
- days_push: 13
- n_releases_24m: 3
Adoption not part of the score
2077 stars · 107 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded
httpmock is a Go library for easily mocking HTTP responses from external resources in tests. It lets you register responders for exact URLs or regex patterns and inspect call counts.
Use cases
- mock external HTTP APIs in Go tests
- stub HTTP responses with exact URL or regexp matching
- count how many HTTP calls my code made during a test
- return fake JSON responses from an API client test
- test error handling for failed HTTP requests
When to choose
- you write Go code that calls external HTTP APIs and want deterministic tests
- you need regexp-based URL matching and call-count assertions
- you want a lightweight, well-maintained MIT-licensed mocking library
When to avoid
- you need to mock non-HTTP protocols like gRPC or databases
- you want contract testing against a real mock server
- your project is not written in Go
Facets
library · maturity stable
testing mocking http-client testing developer-tools apis backend go cross-platform http-mocking go-testing unit-testing http-responder test-double
5 sources
- readme: https://github.com/jarcoal/httpmock · fetched 2026-08-28 · bc6002676583
- homepage: http://godoc.org/github.com/jarcoal/httpmock · fetched 2026-08-29 · c39958946e84
- site_page: https://pkg.go.dev/about · fetched 2026-08-29 · 757852027879
- site_page: https://pkg.go.dev/github.com/jarcoal/httpmock · fetched 2026-08-29 · 6c46f5b10bbd
- site_page: https://go.dev/project · fetched 2026-08-29 · d5ca00bb378b
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| jarcoal/httpmock | main | 86 |
For agents
markdown · JSON · MCP: product_card(name="jarcoal/httpmock")
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem