I’m trying to send values to Opensensemap.org using the Webhook widget on a local server in Docker container. Everything works fine, except that the Webhook stops after a short time sending the data.
According to the documentation valid HTTP response is only 200 or 302 and will stop sending after 10 times, but POST response from Opensensemap is 201 (“Measurements saved in box”)
Is there a way to configure the Blynk Webhook to accept 201 as valid response?
private static boolean isValidResponseCode(int responseCode) {
switch (responseCode) {
case 200:
case 202:
case 204:
case 302:
return true;
default:
return false;
}
}
If you can find that file on your local server installation (easier said than done with a dockerised setup, but should be possible) then you could probably edit it to add 201 to the list and restart the server.
If it all goes horribly wrong then don’t blame me!