{"id":24890454,"url":"https://github.com/yixy/gudong","last_synced_at":"2025-03-27T12:44:26.275Z","repository":{"id":133665275,"uuid":"134280044","full_name":"yixy/gudong","owner":"yixy","description":"A tiny http echo server written by go for printing request and returning specified response.","archived":false,"fork":false,"pushed_at":"2020-07-18T23:40:10.000Z","size":25,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-01T17:15:41.792Z","etag":null,"topics":["cli","http-echo","http-request","http-response"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yixy.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-05-21T14:25:34.000Z","updated_at":"2021-09-02T02:26:32.000Z","dependencies_parsed_at":null,"dependency_job_id":"3978616d-a61c-4ee3-98f9-e1e5c0f5214a","html_url":"https://github.com/yixy/gudong","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yixy%2Fgudong","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yixy%2Fgudong/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yixy%2Fgudong/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yixy%2Fgudong/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yixy","download_url":"https://codeload.github.com/yixy/gudong/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245850256,"owners_count":20682636,"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":["cli","http-echo","http-request","http-response"],"created_at":"2025-02-01T17:15:50.365Z","updated_at":"2025-03-27T12:44:26.245Z","avatar_url":"https://github.com/yixy.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"## How to use ##\n\nStart a tiny http server using gudong.\n\n```\n$ ./gudong start -B=hello,world!\n```\n\nCall gudong server and you will get the specified response.\n\n```\n$ curl http://localhost:7777/mock.do -d mytest\nhello,world! \n```\n\nYou can check up the request headers and body in standard output of gudong.\n\n```\n$ ./target/gudong start -B=hello,world! \nPOST /mock.do HTTP/1.1\nHOST : localhost:7777\nContent-Type : application/x-www-form-urlencoded\nUser-Agent : curl/7.54.0\nAccept : */*\nContent-Length : 6\n\nmytest\n========================================\n#                gudong                #\n========================================\n```\n\nUsing files to specify response.\n\n```\n$ cat \u003e headers  \u003c\u003cEOF                  \nCustom-Header : This is a custom header\nEOF\n\n$ cat \u003e body  \u003c\u003cEOF                  \nHello,world!\nEOF\n\n$ ./gudong start --header-file=headers --body-file=body\n```\n\nUsing `gudong start -h` to see more.\n\n```\n$ ./gudong start -h                      \nThis tiny server print http request header and body to Standard output, \n                and return the response specified by -H or -B flag.\n\nUsage:\n  gudong start [flags]\n\nFlags:\n  -B, --body string          specify response body by string\n      --body-file string     specify response body by file (if --body-file is specified, -B will be ignored)\n  -H, --header string        specify response header by string (multi-headers separate by ;)\n      --header-file string   specify response header by file (if --header-file is specified, -H will be ignored)\n  -h, --help                 help for start\n  -c, --no-chunked           specify body transfer encoding with noChunked when using --body-file\n  -p, --port string          specify http server port (default \"7777\")\n  -r, --read-timeout int     specify http server read timeout (ms) (default 3000)\n  -w, --write-timeout int    specify http server write timeout (ms) (default 3000)\n```\n\n## About gudong ##\n\n[gudong's comming](https://zh.wikipedia.org/wiki/%E5%92%95%E5%92%9A%E6%9D%A5%E4%BA%86) is a Chinese fable.\n\n## About cobra ##\n\n[Cobra](https://github.com/spf13/cobra) is both a library for creating powerful modern CLI applications as well as a program to generate applications and command files.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyixy%2Fgudong","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyixy%2Fgudong","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyixy%2Fgudong/lists"}