Use string as request ID

When I do a request to ResGate I would like to use a string as the ID, is this possible?

For example:

1 Like

Welcome to the forum! :partying_face:

Short answer: No

Resgate currently requires request id property to be of type Number without Decimals, that fits in an unsigned 64 bit integer.

If it receives anything else, it will simply just log an error should simply log an error if running in debug (even if it actually isn’t doing that right now. I will file a debug issue to add this), without replying to the request (as it has no valid ID to reply to).

The RES Client Protocol uses a variant of the JSON RPC 2.0 protocol. The JSON RPC 2.0 allows “String, Number, or NULL value” as id, but Resgate is actually more strict.

The RES Client Protocol spec is missing this, and should be updated to clarify it.

Great question, btw! :grin:

1 Like