Skip to content

Adding history to listen command to cli.

Compare
Choose a tag to compare
@n3wscott n3wscott released this 03 Mar 22:40
· 10 commits to main since this release
c59d2d6

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: ""