Add some example help

This commit is contained in:
Jim Crossley 2021-10-20 21:46:44 -04:00
parent 0741f2bf28
commit 9480a0e944
3 changed files with 63 additions and 0 deletions

View File

@ -0,0 +1,23 @@
To run the server:
```console
cargo run
```
To test a GET:
```console
curl http://localhost:9000
```
To test a POST:
```console
curl -d '{"hello": "world"}' \
-H'content-type: application/json' \
-H'ce-specversion: 1.0' \
-H'ce-id: 1' \
-H'ce-source: http://cloudevents.io' \
-H'ce-type: dev.knative.example' \
http://localhost:9000
```

View File

@ -0,0 +1,23 @@
To run the server:
```console
cargo run
```
To test a GET:
```console
curl http://localhost:8080
```
To test a POST:
```console
curl -d '{"hello": "world"}' \
-H'content-type: application/json' \
-H'ce-specversion: 1.0' \
-H'ce-id: 1' \
-H'ce-source: http://cloudevents.io' \
-H'ce-type: dev.knative.example' \
http://localhost:8080
```

View File

@ -0,0 +1,17 @@
To run the server:
```console
cargo run
```
To test a POST:
```console
curl -d '{"hello": "world"}' \
-H'content-type: application/json' \
-H'ce-specversion: 1.0' \
-H'ce-id: 1' \
-H'ce-source: http://cloudevents.io' \
-H'ce-type: dev.knative.example' \
http://localhost:3030
```