{"id":22170559,"url":"https://github.com/diegohce/httprecorder","last_synced_at":"2025-03-24T17:40:34.367Z","repository":{"id":139432249,"uuid":"199913066","full_name":"diegohce/httprecorder","owner":"diegohce","description":"httprecorder tool to mock integration tests with other microservices","archived":false,"fork":false,"pushed_at":"2019-07-31T19:47:23.000Z","size":23,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2023-03-11T14:37:53.984Z","etag":null,"topics":["http","httpproxy","integration-test","proxy","recorder","replay","replay-response","replay-responses","request-recorder","requests-recorder","test","unit-test"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/diegohce.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":"2019-07-31T18:58:59.000Z","updated_at":"2024-06-19T09:01:53.876Z","dependencies_parsed_at":"2024-06-19T09:11:54.229Z","dependency_job_id":null,"html_url":"https://github.com/diegohce/httprecorder","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diegohce%2Fhttprecorder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diegohce%2Fhttprecorder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diegohce%2Fhttprecorder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diegohce%2Fhttprecorder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/diegohce","download_url":"https://codeload.github.com/diegohce/httprecorder/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245319763,"owners_count":20596032,"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":["http","httpproxy","integration-test","proxy","recorder","replay","replay-response","replay-responses","request-recorder","requests-recorder","test","unit-test"],"created_at":"2024-12-02T06:52:24.818Z","updated_at":"2025-03-24T17:40:34.345Z","avatar_url":"https://github.com/diegohce.png","language":"Go","readme":"# httprecorder\n\n[![Go Report Card](https://goreportcard.com/badge/github.com/diegohce/chaos-proxy)](https://goreportcard.com/report/github.com/diegohce/httprecorder)\u003c!-- [![GitHub release](https://img.shields.io/github/release/diegohce/httprecorder.svg)](https://github.com/diegohce/httprecorder/releases/) --\u003e\n[![Github all releases](https://img.shields.io/github/downloads/diegohce/httprecorder/total.svg)](https://github.com/diegohce/httprecorder/releases/)\n[![GPLv3 license](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://github.com/diegohce/httprecorder/blob/master/LICENSE)\n[![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://github.com/diegohce/httprecorder/graphs/commit-activity)\n[![HitCount](http://hits.dwyl.io/diegohce/httprecorder.svg)](http://hits.dwyl.io/diegohce/httprecorder)\n[![Generic badge](https://img.shields.io/badge/deb%20package-no-red.svg)](https://github.com/diegohce/httprecorder/releases/)\n\n\n## What is it?\nhttprecorder acts almost as a normal proxy. It records http requests and responses when running in recording mode (-record), and replays the stored responses when running in replay mode (-replay).\n\n## But why?\nI use it to run microservices (simple) integration tests. \n\n## Bind address\n\nDefault bind address and port: `0.0.0.0:8080`. It can be changed setting `HTTPRECORDER_BINDADDR` environment variable.\n\n\n## Config file\n\n`httprecorder.json` can be placed into project directory or, preferably, in `/etc/httprecorder`\n\n* filename: Where to dump (or read from) the recorded content.\n* default_host: Where every request that does not match one of `paths` will be routed to.\n* paths: Where to route specific requests. If path ends with `/` it's interpreted as \"begins with\".\n\n```json\n{\n\t\"filename\": \"recording.json\",\n\t\"default_host\": {\n\t\t\"host\": \"http://localhost:6666\"\n\t},\n\t\"paths\": {\n\t\t\"/badservice/status/400\": {\n\t\t\t\"host\": \"http://localhost:6666\"\n\t\t},\n\t\t\"/badservice/status/403\": {\n\t\t\t\"host\": \"http://localhost:6666\"\n\t\t},\n\t\t\"/badservice/status/404\": {\n\t\t\t\"host\": \"http://localhost:6666\"\n\t\t},\n\t\t\"/data/2.5/\": {\n\t\t\t\"host\": \"http://api.openweathermap.org:80\"\n\t\t}\n\t}\n}\n```\n\n# Status\n\nhttprecorder is still in a very early stage. There's code that can be improved for sure.\n\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdiegohce%2Fhttprecorder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdiegohce%2Fhttprecorder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdiegohce%2Fhttprecorder/lists"}