I want to send a http put request to a api using jquery/js here is what i came up with
$.ajax({
type: 'PUT',
dataType: 'json',
url: "http://192.168.x.xxx/api/somerandomusername/lights/1/state",
headers: {"X-HTTP-Method-Override, Access-Control-Allow-Origin: *": "PUT"},
data: {"on":true, "sat":255, "bri":255,"hue":10000}
});
if i'm using the api debugging tool it's working so my url and data are good and i don't have anything showing up in the chrome console.
For more context here is my setup
i'm sending the request to a Philips/hue bridgeusing the url and telling the bulb number 1 this string of data "on":true, "sat":255, "bri":255,"hue":10000.