Category:HANAJavaScript
Article From:https://www.cnblogs.com/sap-jerry/p/9061895.html

Open the SAP HANA Web-Based Development Workbench on the SAP cloud platform to develop the server-side JavaScript.


Create a new package:


Create a new application:


Create a new file google-distance-api.xshttpdest to maintain destination related information:

host = "maps.googleapis.com";
port = 80;
pathPrefix = "/maps/api/distancematrix/xml";
useProxy = true;
proxyHost = "proxy-trial";
proxyPort = 8080;
authType = none;
useSSL = false;
timeout = 30000;

Create a xsjs file to consume the destination and get the distance information from Walldorf to Paris:

Implementation results:

Because the server is JavaScript, HTTP invocation of Google service can no longer be observed in the Chrome developer tool.

To get more original technical articles of Jerry, please pay attention to the public number “Wang Zixi” or scan the following two-dimensional code:

Leave a Reply

Your email address will not be published. Required fields are marked *