eclipse-agail / agile-sdk

JavaScript Agile IoT SDK
Eclipse Public License 2.0
2 stars 4 forks source link

/device/{deviceId}/execute/{command} is a POST not a GET #53

Closed dpap closed 6 years ago

dpap commented 6 years ago

agile-sdk : agile.device.execute(device['deviceId'],command doesn't work.

It does a GET access instead of a POST access

aperezeurob commented 6 years ago

We need the device.execute method of the Agile-IoT SDK:

 agile.device.execute(deviceId, command) ⇒ Promise

in order to write BLE characteristics through the Agile-IoT SDK.

We need to use this method as soon as possible. Do you know when this issue will be solved?

dpap commented 6 years ago

@aperezeurob I've created a pull request to fix the issue. Until it gets reviewed, accepted and pushed to npm I suppose you could do the following a. clone the repo b. npm install c. npm run build

in your project require ('[path_to_agile-sdk]/dist');

@cskiraly @Exulansis I've created a pull with the fix required to make device#execute a POST instead of a GET