HTTP client detect if resourse has been updated
Posted: Tue Apr 26, 2022 6:28 am
Is there a way to detect if a HTTP resource has been changed without downloading it?
The case is: I have a file on the filesystem, which needs to be synced with a file on a HTTP server; if the file on the ESP is updated, it should be uploaded to the HTTP server; and if the file on the server is changed, the ESP should download and update its local copy.
What is the best way to check if the resource has been changed on the server, if there is such a way, without downloading it? I'll run a periodic task which will check for updates, and if I need to download the file each time that will add to a lot of overhead and needless SD card wearing.
The case is: I have a file on the filesystem, which needs to be synced with a file on a HTTP server; if the file on the ESP is updated, it should be uploaded to the HTTP server; and if the file on the server is changed, the ESP should download and update its local copy.
What is the best way to check if the resource has been changed on the server, if there is such a way, without downloading it? I'll run a periodic task which will check for updates, and if I need to download the file each time that will add to a lot of overhead and needless SD card wearing.