Use wscat with HTTP JSON API Streaming API?

WallaceKelly
Fri, 10 Jan 2025 20:06:17 +0000
App Development

Is it possible to use wscat with the 2.x HTTP JSON API?

1. Start the HTTP JSON API.

daml new test

cd test

daml start

2. Confirm the contracts exist and the token is good with curl and v1/query.
(the token should work for you too)

curl http://localhost:7575/v1/query --header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJodHRwczovL2RhbWwuY29tL2p3dC9hdWQvcGFydGljaXBhbnQvc2FuZGJveCIsInN1YiI6ImFsaWNlIiwiaXNzIjoiaWdub3JlZCJ9.uKjafJLbf4KCBL6ys1pBT2jxs0DpflUpKX-5ZRtLVs'

3. Stream the contracts with v1/stream/query.

How to do this with wscat?

2 posts - 1 participant