Open g-mocken opened 4 years ago
Ok, I think I got it. It simply means a DELETE request, instead of the POST for setting the timer, doesn't it?
The easiest way to find out would be to have a look on your browsers web developer network trace window. There you will find the final raw request if you run the action on the site.
Thanks, that confirmed my finding. In Safari, that network trace has a nice "copy as cURL" feature, which gives (with the usual privacy replacements VVVV, AAAA and some uninteresting standard headers removed):
curl 'https://www.services.renault-ze.com/api/vehicle/VVVV/air-conditioning/scheduler' \
-XDELETE \
-H 'Accept: application/json, text/plain, */*' \
-H 'Origin: https://www.services.renault-ze.com' \
-H 'Authorization: Bearer AAAA' \
-H 'Referer: https://www.services.renault-ze.com/' \
-H 'Host: www.services.renault-ze.com'
Can you help me deciphering what this piece of JS code from the Z.E. site does:
In what kind of http request do I have to wrap this "delete"? I am no web/JS developer.