Hi all!
I have a websocket connection open to /v1/stream/query
which works great, and now want to start making use of offset
in future connections as described in the docs:
An optional
offset
returned by a prior query (see output examples below) may be specified before the above, as a separate body. It must be a string, and if specified, the stream will begin immediately after the response body that included that offset
So I have a connection open, I keep track of offset coming in from the server (let’s say I read "219"
), and then at some time later I close a connection and open a new one. In the new connection, I first tried sending two distinct/separate message bodies like so:
{"offset": "219"}
{"templateIds": [ ... ] }
This gives me the following error message
Endpoints.InvalidUserInput: JsonReaderError. Cannot read JSON: <{"offset":"219"}>. Cause: spray.json.DeserializationException: Object is missing required member 'templateIds'
Since it seems like the endpoint was expecting templateIds as a required member, I tried various ways of combining the offset with the query. For example, I tried:
{"offset": "219", "templateIds": [ ... ] }
which gives another invalid json error, and also
{"templateIds": [ ... ], "query": { "offset": "219"} }
which doesn’t seem to work either.
Any help with what I might be doing wrong would be greatly appreciated!