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

java - SSE Emitter : Manage timeouts and complete() -

Voice chat over bluetooth between Android & Python (pybluez) -

java - How to resolve error - package com.squareup.okhttp3 doesn't exist? -