Hi Bill,
I tried to check in the spec, but it's really not helping :(
For getting a single optional resource not present (eg. /7/0/2), I think 404 is right.
For a TLV format when reading whole object instance, I think you should omit the TLV for the corresponding resource.
Julien
On Fri Feb 13 2015 at 04:36:01 Bill Bennett <
william.bennett@xxxxxxxxxxxxxxxxxxx> wrote:
Hi,
What do you think is correct behaviour for an integer resource with no
value?
At the moment my client returns it as an empty string, which generates
an error in Leshan: "500 [Invalid value for integer resource: ] ([/7/0/2])"
This example is happening because the interface is not connected, so
there are no statistics yet (but there will be later).
Is Leshan right to display an error, or should it accept it and display
a blank?
I don't think returning "0" is always right (though this example would
be OK). Also 4.04 Not Found implies that the resource doesn't exist at all.
Cheers,
Bill
_______________________________________________
leshan-dev mailing list
leshan-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/leshan-dev