Need some help with loadurl result

Philippe SCHMUCK philippe-schmuck at orange.fr
Sat Jul 28 11:42:51 EDT 2018


OK, you mean something like this?
loadurl "http://192.168.1.141:16021/api/v1/MyToken/state" custom request {"on" : {"value":true}} callback handler "resultCatcher"

but I get this error:
Script Error  mesage: -2741: Expected “,” or “}” but found “:”.

The embedded {« on » : {« value »:true}} doesn’t really match your example in the wiki so I’m confused not knowing how to put those :-(

Philippe

> Le 28 juil. 2018 à 17:10, James Sentman <james at sentman.com> a écrit :
> 
> Try  using the ‘custom request’ field of the loadurl command:
> 
> http://machomeautomation.com/doku.php/dictionary/more/loadurl
> 
> you can pass that parameter a value of “PUT” to send that. If you are sending form variables then that will likely work. If you need access to a raw data block to send then that may not work right now. If that doesn’t work then you’ll have to use a curl command in a shell script, or a do async shell script if it takes more than a fraction of a second to respond. 
> 
>> On Jul 28, 2018, at 10:31 AM, Philippe SCHMUCK <philippe-schmuck at orange.fr> wrote:
>> 
>> Ok, so I now have the second question: to turn ON the light, I need to send a PUT as stated in the joined file.
>> How can I do this inside XTension?
>> 
> 
> 
> 
> Thanks,
>  James
> 
> 
> James Sentman                       http://www.PlanetaryGear.org		http://MacHomeAutomation.com
> 
> 
> 
> 
> _______________________________________________
> XTensionList mailing list
> XTensionList at machomeautomation.com
> http://mail.machomeautomation.com/mailman/listinfo/xtensionlist



More information about the XTensionList mailing list