Monday 6 March 2017

HANA XS: Javascript - Outbound API's ($.net)

SAP HANA XS outbound API($..net) provides tools that you can use to perform the below action.

  1. $.net.SMTPConnection.
    for sending $.net.Mail objects by means of an SMTP Connection.
  2. $.net.Mail
    For constructing and sending multipart of emails.
  3. $.net.http
    HTTP(s) client classes for outbound connectivity and an HTTP(s) destination class that hold metadata.
Example of $.net.http  API.
  1.  Create Hana destination file - myDestination.xshttpdest file.
    An HTTP destination defines connection details for services running on specific hosts whose     details  you want to define and distribute.The definition can be referenced by an application.


  2. Create JavaScript file - OutboundAPI.xsjs.


  3. Run you .xsjs file via Run As XS service and you should get below output.