Skip to Content
0

How to add url for post request without hard coding it

Nov 07, 2017 at 07:29 AM

50

avatar image
Former Member

Error is: ESLint (sap-no-harcoded-url): Hardcoded (non relative) URL found. Category Fiori Architectural guidelines

sending post request from SAP Fiori app developed on SAP WEB IDE

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
avatar image
Former Member Dec 13, 2017 at 04:49 PM
0

Here is how you do it

add it to the i18.properties file as follows

#XLNK: 
Login = [your full app url]

and invoke it from the controller

var oView = sap.ui.getCore().byId("[your view id]");
var oResourceBundle = oView.getModel("i18n").getResourceBundle();
var url = oResourceBundle.getText("Login").toString().trim();
Share
10 |10000 characters needed characters left characters exceeded