javascript - Lightify-Rest API with JS - CORS Error -


i'd use osram-lightify rest-api (https://eu.lightify-api.org/), everytime post initial token error (invalid credentials) have used these credentials in node js example. guess related fact api doesn't allow cross origin request, have found service works.

my code (without cors related, yes have inserted real credentials):

$.post("https://eu.lightify-api.org/lightify/services/session",     {"username" : "username",     "password" : "password",     "serialnumber" : "sn"}, function(data,error){         console.log(data);         console.warn(error);     }); 


Comments

Popular posts from this blog

jquery - uncaught exception: DataTables Editor - remote hosting of code not allowed -

python - multiprocessing pool with map -

python - Poor performance of db. inserts using django-mssql -