https://github.com/yixy/gudong
A tiny http echo server written by go for printing request and returning specified response.
https://github.com/yixy/gudong
cli http-echo http-request http-response
Last synced: 10 months ago
JSON representation
A tiny http echo server written by go for printing request and returning specified response.
- Host: GitHub
- URL: https://github.com/yixy/gudong
- Owner: yixy
- License: apache-2.0
- Created: 2018-05-21T14:25:34.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2020-07-18T23:40:10.000Z (over 5 years ago)
- Last Synced: 2025-02-01T17:15:41.792Z (12 months ago)
- Topics: cli, http-echo, http-request, http-response
- Language: Go
- Homepage:
- Size: 24.4 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## How to use ##
Start a tiny http server using gudong.
```
$ ./gudong start -B=hello,world!
```
Call gudong server and you will get the specified response.
```
$ curl http://localhost:7777/mock.do -d mytest
hello,world!
```
You can check up the request headers and body in standard output of gudong.
```
$ ./target/gudong start -B=hello,world!
POST /mock.do HTTP/1.1
HOST : localhost:7777
Content-Type : application/x-www-form-urlencoded
User-Agent : curl/7.54.0
Accept : */*
Content-Length : 6
mytest
========================================
# gudong #
========================================
```
Using files to specify response.
```
$ cat > headers < body <