{"id":37149417,"url":"https://github.com/areknoster/hypert","last_synced_at":"2026-01-14T17:38:45.544Z","repository":{"id":226972289,"uuid":"769607708","full_name":"areknoster/hypert","owner":"areknoster","description":"Go package for rapid testing of real HTTP APIs integrations. Sanitize and record requests and responses during development. Replay and validate in CI.","archived":false,"fork":false,"pushed_at":"2025-11-23T09:02:51.000Z","size":101,"stargazers_count":25,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-19T02:54:59.118Z","etag":null,"topics":["api","api-client","api-rest","go","golang","http","http-client","integration-testing","unit-testing"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/areknoster.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-03-09T14:58:14.000Z","updated_at":"2025-10-04T20:47:41.000Z","dependencies_parsed_at":"2024-04-10T19:32:10.321Z","dependency_job_id":"cbf82e15-72e0-4014-8016-8ce1f6b32a2b","html_url":"https://github.com/areknoster/hypert","commit_stats":null,"previous_names":["areknoster/htttest"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/areknoster/hypert","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/areknoster%2Fhypert","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/areknoster%2Fhypert/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/areknoster%2Fhypert/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/areknoster%2Fhypert/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/areknoster","download_url":"https://codeload.github.com/areknoster/hypert/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/areknoster%2Fhypert/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28428897,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T16:38:47.836Z","status":"ssl_error","status_checked_at":"2026-01-14T16:34:59.695Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","api-client","api-rest","go","golang","http","http-client","integration-testing","unit-testing"],"created_at":"2026-01-14T17:38:44.823Z","updated_at":"2026-01-14T17:38:45.539Z","avatar_url":"https://github.com/areknoster.png","language":"Go","readme":"# Hypert - HTTP API Testing Made Easy\n[![ci-img]][ci-url]\n[![pkg-img]][pkg-url]\n[![reportcard-img]][reportcard-url]\n[![coverage-img]][coverage-url]\n[![tag-img]][tag-url]\n[![license-img]][license-url]\n\nHypert is an open-source Go library that simplifies testing of HTTP API clients. It provides a convenient way to record and replay HTTP interactions, making it easy to create reliable and maintainable tests for your API clients.\n\n## Features\n\n- Record and replay HTTP interactions\n- Request sanitization to remove sensitive information\n- Request validation to ensure the integrity of recorded requests\n- Seamless integration with Go's `http.Client`\n- Extensible and configurable options\n\n## Getting Started\n\n1. Install Hypert:\n\n```bash\ngo get github.com/areknoster/hypert\n```\n\n2. Use `hypert.TestClient` to create an `http.Client` instance for testing:\n```go\nfunc TestMyAPI(t *testing.T) {\n\thttpClient := hypert.TestClient(t, true) // true to record real requests\n\t// Use the client to make API requests. \n\t// The requests and responses would be stored in ./testdata/TestMyAPI\n\tmyAPI := NewMyAPI(httpClient, os.GetEnv(\"API_SECRET\")) \n\t// Make an API request with your adapter.\n\t// use static arguments, so that validation against recorded requests can happen\n\tstuff, err := myAPI.GetStuff(time.Date(2022, 1, 1, 0, 0, 0, 0, time.UTC)) \n\tif err != nil {\n\t\tt.Fatalf(\"failed to get stuff: %v\", err)\n\t}\n    // Assertions on the actual API response\n\tif stuff.ID != \"ID-FROM-RESP\" {\n\t\tt.Errorf(\"stuff \")\n\t}\n}\n```\nAfter you're done with building and testing your integration, change the mode to replay\n```go\nfunc TestMyAPI(t *testing.T) {\n    httpClient := hypert.TestClient(t, false) // false to replay stored requests\n    // Now client would validate requests against what's stored in ./testdata/TestMyAPI/*.req.http \n    // and load the response from  ./testdata/TestMyAPI/*.resp.http\n    myAPI := NewMyAPI(httpClient, os.GetEnv(\"API_SECRET\"))\n    // HTTP requests are validated against what was prevously recorded. \n    // This behaviour can be customized using WithRequestValidator option\n    stuff, err := myAPI.GetStuff(time.Date(2022, 1, 1, 0, 0, 0, 0, time.UTC)) \n    if err != nil {\n        t.Fatalf(\"failed to get stuff: %v\", err)\n    }\n    // Same assertions that were true on actual API responses should be true for replayed API responses.\n\tif stuff.ID != \"ID-FROM-RESP\" {\n        t.Errorf(\"stuff \")\n    }\n}\n```\nNow your tests:\n- are deterministic\n- are fast\n- bring the same confidence as integration tests\n\n## Stability\nI plan to maintain backward compatibility as much as possible, but breaking changes may occur before the first stable release, v1.0.0 if major issues are discovered.\n\n## Examples\n\nCheck out the [examples](examples/) directory for sample usage of Hypert in different scenarios.\n\n## Contributing\n\nContributions are welcome! If you find a bug or have a feature request, please open an issue on the [GitHub repository](https://github.com/areknoster/hypert). If you'd like to contribute code, please fork the repository and submit a pull request.\n\n## License\n\nHypert is released under the [MIT License](LICENSE).\n\n---\n\n[ci-img]: https://github.com/areknoster/hypert/actions/workflows/ci.yaml/badge.svg\n[ci-url]: https://github.com/areknoster/hypert/actions/workflows/ci.yaml\n[pkg-img]: https://pkg.go.dev/badge/areknoster/hypert/\n[pkg-url]: https://pkg.go.dev/github.com/areknoster/hypert/\n[reportcard-img]: https://goreportcard.com/badge/github.com/areknoster/hypert\n[reportcard-url]: https://goreportcard.com/report/github.com/areknoster/hypert\n[coverage-img]: https://codecov.io/gh/areknoster/hypert//branch/main/graph/badge.svg\n[coverage-url]: https://codecov.io/gh/areknoster/hypert/\n[license-img]: https://img.shields.io/badge/License-MIT-yellow.svg\n[license-url]: https://github.com/areknoster/hypert/blob/main/LICENSE\n[tag-img]: https://img.shields.io/github/v/tag/areknoster/hypert\n[tag-url]: https://github.com/areknoster/hypert/tags\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fareknoster%2Fhypert","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fareknoster%2Fhypert","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fareknoster%2Fhypert/lists"}