Skip to Content

HTTP POST service request from SAP UI5 to SAP IOT

Dec 14, 2017 at 07:34 AM


avatar image
Former Member

Hi Experts,

Please guide me how to push data from SAP ui5 app to SAP iot push table through HTTP POST request.

This is giving 401 OPTIONS error(Unauthorized)

PLease help me out

ajax.png (17.9 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Anton Levin
Dec 14, 2017 at 07:39 AM

Hello Sidhant,

Authorization HTTP header value (after Basic key word) should be Base64-encoded "username:password" string. Change to:

xhr.setRequestHeader ("Authorization", "Basic " + btoa(sUsername + ":" + sPassword));



Show 3 Share
10 |10000 characters needed characters left characters exceeded
Former Member

same error

ajax.png (128.0 kB)

An error (originally) is not what you have described. You end up in CORS (cross origin issue). You make an HTTP request from your UI5 app to IoT MMS. In order to solve it, you would need to use HTTP destination in your UI5 app.