Adding history to listen command to cli.
New feature: return back the events that listen has collected via a GET on /history
.
Start the listener:
$ cloudevents listen
listening on :8080
Send a cloudevent:
$ cloudevents send http://localhost:8080/ --id abc-123 --source cloudevents.conformance.tool --type foo.bar
See it is collected by the listener:
$ go run ./cmd/cloudevents listen
listening on :8080
Mode: binary
ContextAttributes:
specversion: "1.0"
type: foo.bar
id: abc-123
source: cloudevents.conformance.tool
TransportExtensions:
User-Agent: Go-http-client/1.1
Data: ""
---
Collect history:
$ curl http://localhost:8080/history
Mode: binary
ContextAttributes:
specversion: "1.0"
type: foo.bar
id: abc-123
source: cloudevents.conformance.tool
TransportExtensions:
User-Agent: Go-http-client/1.1
Data: ""