sdk-rust/example-projects/axum-example
Jim Crossley 9480a0e944 Add some example help 2021-10-20 21:46:44 -04:00
..
src Add Axum binding 2021-08-31 15:40:04 -04:00
Cargo.toml Add Axum binding 2021-08-31 15:40:04 -04:00
README.md Add some example help 2021-10-20 21:46:44 -04:00

README.md

To run the server:

cargo run

To test a GET:

curl http://localhost:8080

To test a POST:

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