This will increment the counter by 5. Relatedly, passing in -5 will decrement the counter. Requiring that you specify JSON as the content type yet allowing you to pass in invalid JSON strikes me as a bug.
If you attempt to decrement by a negative integer, the operation will simply hang indefinitely. Here's an example:
I've detected two problems in the HTTP API for counters.
This will increment the counter by 5. Relatedly, passing in
-5
will decrement the counter. Requiring that you specify JSON as the content type yet allowing you to pass in invalid JSON strikes me as a bug.It seems to me that this should either result in a positive increment or throw an error.