rosettajs_dist_lib_rosetta_network.js

"use strict";
/***************************************************
* Licensed Materials - Property of HCL.
* (c)Copyright HCL America, Inc. 2023-2024
****************************************************/
Object.defineProperty(exports, "__esModule", { value: true });
exports._notes = void 0;
exports.getHTTPHeader = getHTTPHeader;
exports.setHTTPHeader = setHTTPHeader;
exports.certificate = certificate;
exports.getPortsList = getPortsList;
exports.restfulAPI = restfulAPI;
const tslib_1 = require("tslib");
/**
 * @file Network
 * @module network
 * @category Network
 */
const notesf = tslib_1.__importStar(require("../notes/network"));
exports._notes = notesf;
/**
 * In a Web application, returns the value of an HTTP header from the browser
 * client request being processed by the server.
 * @throws {Error} method not implemented
 * @TODO this needs to be implemented
 */
function getHTTPHeader() {
    return notesf.GetHTTPHeader();
}
/**
 * In a Web application, sets the value of HTTP headers in the response being
 * generated by the server for the browser client.
 * @throws {Error} method not implemented
 * @TODO this needs to be implemented
 */
function setHTTPHeader() {
    return notesf.SetHTTPHeader();
}
/**
 * Extracts information from the Certified Public Key in the Domino® Directory.
 * @throws {Error} no plans to implement
 */
function certificate() {
    return notesf.Certificate();
}
/**
 * Returns a list of enabled or disabled ports.
 * @throws {Error} no plans to implement
 */
function getPortsList() {
    return notesf.GetPortsList();
}
/**
 * Function to call a restful API.
 * @param {string} url - The URL of the REST service.
 * @param {string} method - The HTTP method (GET, POST, PUT, DELETE, etc.).
 * @param {string} headers - Optional headers to include in the request as a JSON string.
 * @param {string} body - Optional body for POST, PUT, or PATCH requests as a JSON string.
 * @param {string} additionalRequestParams - Optional additional request parameters as a JSON string.
 * @returns {Promise<any>} - A promise that resolves to the response data or rejects with an error.
 */
function restfulAPI(url, method, headers, body = null, additionalRequestParams = null) {
    return notesf.RestfulAPI(url, method, headers, body, additionalRequestParams);
}
//# sourceMappingURL=network.js.map