An open API service indexing awesome lists of open source software.

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.

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 <