{"id":17106314,"url":"https://github.com/aereal/go-http-replay","last_synced_at":"2025-07-09T19:33:52.083Z","repository":{"id":34899186,"uuid":"163189896","full_name":"aereal/go-http-replay","owner":"aereal","description":"Record and replay HTTP response for testing","archived":false,"fork":false,"pushed_at":"2025-06-27T02:56:39.000Z","size":52,"stargazers_count":8,"open_issues_count":7,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-06T11:56:52.482Z","etag":null,"topics":["go","golang","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/aereal.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":"2018-12-26T14:47:52.000Z","updated_at":"2025-04-06T14:45:12.000Z","dependencies_parsed_at":"2023-02-12T01:00:22.715Z","dependency_job_id":"ea3c569c-a35f-4a27-8d5c-b737227a222f","html_url":"https://github.com/aereal/go-http-replay","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/aereal/go-http-replay","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aereal%2Fgo-http-replay","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aereal%2Fgo-http-replay/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aereal%2Fgo-http-replay/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aereal%2Fgo-http-replay/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aereal","download_url":"https://codeload.github.com/aereal/go-http-replay/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aereal%2Fgo-http-replay/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264502489,"owners_count":23618616,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["go","golang","testing"],"created_at":"2024-10-14T15:44:29.785Z","updated_at":"2025-07-09T19:33:51.988Z","avatar_url":"https://github.com/aereal.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status][ci-status-badge]][ci-status]\n[![MIT License](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)][license]\n[![GoDoc][godoc-badge]][godoc]\n\n# go-http-replay\n\nRecord and replay HTTP response for testing\n\n## Synopsis\n\nReplay HTTP response or fetch from the remote:\n\n```go\nimport (\n\t\"net/http\"\n\t\"testing\"\n\n\thttpreplay \"github.com/aereal/go-http-replay\"\n)\n\nfunc Test_http_lib(t *testing.T) {\n\thttpClient := \u0026http.Client{\n\t\tTransport: httpreplay.NewReplayOrFetchTransport(\"./testdata\", http.DefaultClient),\n\t}\n\t// httpClient will behave like the client that created from NewReplayTransport but DO actual request if local cache is missing.\n}\n```\n\nOnly replay HTTP response from cache:\n\n```go\nimport (\n\t\"net/http\"\n\t\"testing\"\n\n\thttpreplay \"github.com/aereal/go-http-replay\"\n)\n\nfunc Test_http_lib(t *testing.T) {\n\thttpClient := \u0026http.Client{\n\t\tTransport: httpreplay.NewReplayTransport(\"./testdata\"),\n\t}\n\t// httpClient will not do actual request to remote sites but returns the response from local cache files.\n}\n```\n\n## See also\n\n- https://github.com/vcr/vcr - go-http-replay is heavily inspired from this project\n\n## Author\n\n- aereal\n\n[license]: https://github.com/aereal/go-http-replay/blob/main/LICENSE\n[godoc]: https://pkg.go.dev/github.com/aereal/go-http-replay\n[godoc-badge]: https://pkg.go.dev/badge/aereal/go-http-replay\n[ci-status]: https://github.com/aereal/go-http-replay/actions/workflows/CI\n[ci-status-badge]: https://github.com/aereal/go-http-replay/workflows/CI/badge.svg\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faereal%2Fgo-http-replay","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faereal%2Fgo-http-replay","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faereal%2Fgo-http-replay/lists"}