Skip to content

Commit 9480a0e

Browse files
committed
Add some example help
1 parent 0741f2b commit 9480a0e

File tree

3 files changed

+63
-0
lines changed

3 files changed

+63
-0
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
To run the server:
2+
3+
```console
4+
cargo run
5+
```
6+
7+
To test a GET:
8+
9+
```console
10+
curl http://localhost:9000
11+
```
12+
13+
To test a POST:
14+
15+
```console
16+
curl -d '{"hello": "world"}' \
17+
-H'content-type: application/json' \
18+
-H'ce-specversion: 1.0' \
19+
-H'ce-id: 1' \
20+
-H'ce-source: http://cloudevents.io' \
21+
-H'ce-type: dev.knative.example' \
22+
http://localhost:9000
23+
```
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
To run the server:
2+
3+
```console
4+
cargo run
5+
```
6+
7+
To test a GET:
8+
9+
```console
10+
curl http://localhost:8080
11+
```
12+
13+
To test a POST:
14+
15+
```console
16+
curl -d '{"hello": "world"}' \
17+
-H'content-type: application/json' \
18+
-H'ce-specversion: 1.0' \
19+
-H'ce-id: 1' \
20+
-H'ce-source: http://cloudevents.io' \
21+
-H'ce-type: dev.knative.example' \
22+
http://localhost:8080
23+
```
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
To run the server:
2+
3+
```console
4+
cargo run
5+
```
6+
7+
To test a POST:
8+
9+
```console
10+
curl -d '{"hello": "world"}' \
11+
-H'content-type: application/json' \
12+
-H'ce-specversion: 1.0' \
13+
-H'ce-id: 1' \
14+
-H'ce-source: http://cloudevents.io' \
15+
-H'ce-type: dev.knative.example' \
16+
http://localhost:3030
17+
```

0 commit comments

Comments
 (0)