Quantcast
Viewing all articles
Browse latest Browse all 3285

Javascript: Send IoT message to HCP IoT via HTTP Post

Hi,

 

I have the requirement that I need to send an IoT message with javascript to SAP IoT.

IoT is configured and working, sending the message via postman works, also via a python script on raspberry.

 

But now I need to code it in javascript so it can be included in a Evothings app.

 

I have little experience with javascript and also run into CORS problems (http return code 401 unauthorized)

 

I have tried it with a ajax jquery request and via an xmlhttprequest.

Both have cross domain problems.

 

How do I code a javascript post to hcp IoT.

The javascript will run in an app in the outside world. the only authorization is the OAuth token for the device in combination with the device ID and message ID.

 

Thanks,

Tom


Viewing all articles
Browse latest Browse all 3285

Trending Articles