{"id":17967182,"url":"https://github.com/pdrb/gecho","last_synced_at":"2026-02-16T19:35:54.981Z","repository":{"id":259805619,"uuid":"879465021","full_name":"pdrb/gecho","owner":"pdrb","description":"Simple http \"echo\" server written with Go stdlib.","archived":false,"fork":false,"pushed_at":"2024-10-30T01:43:47.000Z","size":15,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-17T21:05:46.666Z","etag":null,"topics":["echo-http","go","http-echo","http-server","stdlib"],"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/pdrb.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-10-28T00:36:53.000Z","updated_at":"2024-10-30T01:41:10.000Z","dependencies_parsed_at":null,"dependency_job_id":"15d96f87-824a-4bdf-85aa-8398580d372a","html_url":"https://github.com/pdrb/gecho","commit_stats":null,"previous_names":["pdrb/gecho"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/pdrb/gecho","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pdrb%2Fgecho","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pdrb%2Fgecho/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pdrb%2Fgecho/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pdrb%2Fgecho/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pdrb","download_url":"https://codeload.github.com/pdrb/gecho/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pdrb%2Fgecho/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29516170,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-16T18:37:19.720Z","status":"ssl_error","status_checked_at":"2026-02-16T18:36:46.920Z","response_time":115,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["echo-http","go","http-echo","http-server","stdlib"],"created_at":"2024-10-29T14:04:27.280Z","updated_at":"2026-02-16T19:35:54.968Z","avatar_url":"https://github.com/pdrb.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gecho\n\n[![Go Report Card](https://goreportcard.com/badge/github.com/pdrb/gecho)](https://goreportcard.com/report/github.com/pdrb/gecho)\n[![CI](https://github.com/pdrb/gecho/actions/workflows/ci.yml/badge.svg)](https://github.com/pdrb/gecho/actions/workflows/ci.yml)\n[![LICENSE](https://img.shields.io/github/license/pdrb/gecho)](https://github.com/pdrb/gecho/blob/main/LICENSE)\n\nSimple http \"echo\" server written in Go using only the standard library.\n\nThe request will be parsed and the response will be a prettified (indented) json with the request data.\n\nDuplicated headers and params are supported and will be comma separated in the response.\n\nThe origin IP will be extracted from headers (X-Real-IP, X-Forwarded-For, etc...) or directly from remote address.\n\n## Install\n\nInstall compiling from source using Go:\n\n```shell\ngo install github.com/pdrb/gecho@latest\n```\n\n## Usage\n\n```text\nUsage: gecho [options]\n\nA simple http \"echo\" server written in Go\n\nOptions:\n  -h, --help     Show this help message and exit\n  -l, --listen   Listen address (default: \":8090\")\n  -t, --timeout  Server timeout in seconds (default: 60)\n  -v, --version  Show version and exit\n\nExample: gecho --listen 0.0.0.0:80\n```\n\n## Example\n\nThe following `curl`:\n\n```shell\ncurl -X POST 'http://localhost:8090/headers?name=John\u0026food=apple\u0026food=banana\u0026age=32' \\\n    -H 'H1: Header 1' \\\n    -H 'H1: Repeated Header 1' \\\n    -H \"X-Auth: 1234\" \\\n    -H 'Content-Type: application/json' \\\n    -d '{\"foo\": \"bar\", \"foo\": \"baz\"}'\n```\n\nShould return a response like:\n\n```json\n{\n  \"data\": \"{\\\"foo\\\": \\\"bar\\\", \\\"foo\\\": \\\"baz\\\"}\",\n  \"headers\": {\n    \"Accept\": \"*/*\",\n    \"Content-Length\": \"28\",\n    \"Content-Type\": \"application/json\",\n    \"H1\": \"Header 1,Repeated Header 1\",\n    \"User-Agent\": \"curl/7.81.0\",\n    \"X-Auth\": \"1234\"\n  },\n  \"json\": {\n    \"foo\": \"bar\",\n    \"foo\": \"baz\"\n  },\n  \"method\": \"POST\",\n  \"origin\": \"127.0.0.1\",\n  \"params\": {\n    \"age\": \"32\",\n    \"food\": \"apple,banana\",\n    \"name\": \"John\"\n  },\n  \"url\": \"http://localhost:8090/headers?name=John\u0026food=apple\u0026food=banana\u0026age=32\"\n}\n```\n\nServer log:\n\n```text\n$ gecho --listen 127.0.0.1:8090\n\n2024/10/29 22:25:04 INFO starting server address=127.0.0.1:8090 timeout=60 version=1.2.0\n2024/10/29 22:25:07 INFO handled request method=POST path=/headers addr=127.0.0.1:57488 elapsed=95.89µs\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpdrb%2Fgecho","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpdrb%2Fgecho","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpdrb%2Fgecho/lists"}