When you request for resources of one endpoint, that request is asynchronous and it will be delivered in two steps.
Step 1: You make the request and and get as response from Device Connector an async-response-id that you will be used to map the response afterwards.
Step 2: In the notification channel (that you should have created beforehand), it will come at some point a notification with the async-response-id and the real value of the requested resource. You need to map that notification to the request that you made in step 1 using that async-response-id.
The value comes B64 encoded. You just need to decode it and it should be it.
After first request, if you make a new request to the same resource it will come from cache (it is cached 60 secs). In that case, you wont receive any async id and the value will be returned straight in Step 1 already decoded.
After first request, if you make a new request to the same resource it
will come from cache (it is cached 60 secs). In that case, you wont
receive any async id and the value will be returned straight in Step 1
already decoded.
Does it only work for static resources?
Because I tried to issue following command many times within 60 seconds:
Sorry for the delay but I was out last week. About your question, if your device if responding to the request with Max-age=0, then the value is never cached and you will always get async-response.