{"id":37126301,"url":"https://github.com/andboson/http-echo-logger","last_synced_at":"2026-01-14T14:35:48.685Z","repository":{"id":40301122,"uuid":"430069626","full_name":"andboson/http-echo-logger","owner":"andboson","description":"http echo-mock-server","archived":false,"fork":false,"pushed_at":"2024-07-16T16:24:18.000Z","size":53,"stargazers_count":5,"open_issues_count":1,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-31T22:49:59.605Z","etag":null,"topics":["debug","echo","golang","http","logging","mock-server","mockwebserver","request"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/andboson.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":"2021-11-20T10:14:50.000Z","updated_at":"2022-07-18T07:25:57.000Z","dependencies_parsed_at":"2024-06-20T07:09:26.371Z","dependency_job_id":"35bcda34-03d0-4dd4-ad6d-3fed9708aa42","html_url":"https://github.com/andboson/http-echo-logger","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/andboson/http-echo-logger","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andboson%2Fhttp-echo-logger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andboson%2Fhttp-echo-logger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andboson%2Fhttp-echo-logger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andboson%2Fhttp-echo-logger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andboson","download_url":"https://codeload.github.com/andboson/http-echo-logger/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andboson%2Fhttp-echo-logger/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28423760,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T13:30:50.153Z","status":"ssl_error","status_checked_at":"2026-01-14T13:29:08.907Z","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":["debug","echo","golang","http","logging","mock-server","mockwebserver","request"],"created_at":"2026-01-14T14:35:47.966Z","updated_at":"2026-01-14T14:35:48.658Z","avatar_url":"https://github.com/andboson.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# http-cli-echo-logger\n\nA simple http echo server for logging incoming requests\n\n* echo server with multiple endpoints support\n* mock server with custom response with request matching (as http://wiremock.org/ kinda)\n* log requests to stdout\n* see the history of requests in the browser \n* get the history of requests via API\n* one binary file only\n\n### Last changes\n\n* added keeping headers order\n* added copy Curl request button\n* added displaying both an original request and a mock response\n\n### Run locally\n\n```shell\ngo run ./cmd/main.go\n```\n\n* Default app port - `80`\n* Default echo endpoint - any, except `/`(GET), `/ipa`\n* Default api endpoint - `/ipa`\n\n### Run with docker\n\nRun a container:\n\n```shell\ndocker run -it -p8088:80 andboson/http-cli-echo-logger \n```\n\nor with a custom echo endpoint (`/api/v1/`):\n\n```shell\ndocker run -it -p8081:80 -eCUSTOM_ENDPOINTS=\"[{\"path\":\"/auth\",\"request\":\"\",\"mock\":\"{\\\"key\\\":\\\"auth_key\\\"}]\" andboson/http-cli-echo-logger \n```\n\n(see [docker-compose.yaml](docker-compose.yaml) to full example)\n\nExec `curl` request to the `/echo` endpoint:\n\n```shell\ncurl -X 'POST' -i \\\n  'http://localhost:80/echo?new=1' \\       \n  -H 'accept: application/json' \\  \n  -H 'Content-Type: application/json' \\\n  -d '{\n      \"foo\":\"bar\"   \n    }'\n```\n\nThis response will be returned as an answer.\nAlso, this request will be logged in docker console:\n\n```shell\nPOST\nRemoteAddr: 172.90.20.1:47694\nRequestURI: /echo?new=1\n Content-Type: application/json\n Content-Length: 17\n User-Agent: curl/7.74.0\n Accept: application/json\nBody:\n {\n  \"foo\":\"bar\"\n}\n```\n\n### Run in CLI\n\n```shell\nCUSTOM_ENDPOINTS='[{\"path\":\"/q\",\"mock\":\"{\\\"foo\\\":\\\"bar\\\"}\"}]' go run cmd/main.go \n```\n\n### History\n\nYou can see the history of requests in your browser http://localhost/\n\n![Screenshot from 2022-07-02 15-47-06](https://user-images.githubusercontent.com/2089327/177001390-9d1e7269-f876-446b-94d1-721208fcd8a9.png)\n\n\n\n### API\n\nTo get an array of history items\n\n```shell\ncurl 'http://localhost:80/ipa' \n```\n\nreturns:\n```json\n[{\"Body\":\"{\\\"foo2\\\":\\\"bar\\\"}\",\"Header\":{\"Accept\":[\"*/*\"],\"Content-Length\":[\"14\"],\"Content-Type\":[\"application/x-www-form-urlencoded\"],\"User-Agent\":[\"curl/7.74.0\"]},\"Method\":\"POST\",\"RemoteAddr\":\"172.90.20.1:58468\",\"RequestURI\":\"/graphQl\",\"URL\":{\"Scheme\":\"\",\"Opaque\":\"\",\"User\":null,\"Host\":\"\",\"Path\":\"/graphQl\",\"RawPath\":\"\",\"ForceQuery\":false,\"RawQuery\":\"\",\"Fragment\":\"\",\"RawFragment\":\"\"}}]\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandboson%2Fhttp-echo-logger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandboson%2Fhttp-echo-logger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandboson%2Fhttp-echo-logger/lists"}