@sap-cloud-sdk/connectivity
Version:
SAP Cloud SDK for JavaScript connectivity
11 lines (10 loc) • 522 B
TypeScript
import type { HttpDestination } from './destination';
import type { Protocol } from './protocol';
/**
* Extracts the http protocol from the destination URL. The default value is http if no protocol is given.
* @param destination - URL of this destination is parsed
* @throws Error in case a unsupported protocol is given in the destination URL like rfc://example.com.
* @returns The protocol, either https or http.
* @internal
*/
export declare function getProtocolOrDefault(destination: HttpDestination): Protocol;