Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By ChenBH
#57611
martinayotte wrote:I'm not sure if it is the problem, but your server.on("/jsoninputs", handleJson); has a slash at the beginning and your JavaScript doesn't. Try to add one in the JavaScript.



Yup, tried that.
I see in the browser's console that the request is sent with "/" appended to it in the beginning no matter what I insert: tried <device_ip>/jsoninputs+nocache and in the console it appeared: /<device_ip>/jsoninputs?nocache=<random_num>.
Tried removing the dot from nocache var.

Still no clue :(
User avatar
By ChenBH
#57626
martinayotte wrote:Did you tried to query the /jsoninputs?nocache=... directly into the browser without JavaScript ?
If it works, then the bug is in the JavaScript ...


Tried that too...using the format /command&arg=arg_value straight in the URL doesn't work.
I was wrong in passing the arguments to the uri, the right format is: /command?arg1=arg1_val&arg2=arg2_val&arg3=arg3_val.
So silly....
Hope it helped somebody :)