Skip to content

Commit 2cacf9c

Browse files
add echo example
1 parent 4064c84 commit 2cacf9c

File tree

2 files changed

+39
-0
lines changed

2 files changed

+39
-0
lines changed

examples/echo/README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Echo Service example
2+
3+
```
4+
podman-compose up
5+
```
6+
7+
Test the service with `curl like this`
8+
9+
```
10+
$ curl -X POST -d "foobar" http://localhost:8080/; echo
11+
12+
CLIENT VALUES:
13+
client_address=10.89.31.2
14+
command=POST
15+
real path=/
16+
query=nil
17+
request_version=1.1
18+
request_uri=http://localhost:8080/
19+
20+
SERVER VALUES:
21+
server_version=nginx: 1.10.0 - lua: 10001
22+
23+
HEADERS RECEIVED:
24+
accept=*/*
25+
content-length=6
26+
content-type=application/x-www-form-urlencoded
27+
host=localhost:8080
28+
user-agent=curl/7.76.1
29+
BODY:
30+
foobar
31+
```

examples/echo/docker-compose.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
version: '3'
3+
services:
4+
web:
5+
image: k8s.gcr.io/echoserver:1.4
6+
ports:
7+
- "${HOST_PORT:-8080}:8080"
8+

0 commit comments

Comments
 (0)