Skip to content

class net.http.Destination

Ayhan Rashidov edited this page Sep 5, 2022 · 2 revisions

$.net.http.Destination Class

HTTP(s) destination that holds metadata, for example: host, port, useSSL. The destination can be retrieved from the database with $.net.http.readDestination.

Reference

SAP Help

https://help.sap.com/doc/3de842783af24336b6305a3c0223a369/2.0.03/en-US/$.net.http.Destination.html

Module

https://github.com/codbex/codbex-kronos/tree/main/modules/api/api-xsjs/src/main/resources/META-INF/dirigible/kronos/http

Sample Usage

let http = $.net.http;
let response_prev = require('http/v4/response');

/*
Read service.xshttpdest inside the Demo package that contains:
host=https://services.odata.org;
pathPrefix=/V4/Northwind/Northwind.svc/;
*/
let dest = http.readDestination("Demo", "service");
// Check if the file has been read properly
response_prev.println("Host: " +dest.host+ " Path Prefix: " +dest.pathPrefix);

Unit Tests

https://github.com/codbex/codbex-kronos/tree/main/modules/engines/engine-xsjs/src/test/resources/META-INF/dirigible/test/kronos/http

Integration Tests ❌

Wiki icons legend

✅ - Feature implemented and working as supposed.
⚠️ - Feature partially implemented and needs to be finished.
❌ - Feature not implemented yet.

Clone this wiki locally