feat: 🎸 Add initial setup for client daemon integration (#1987)

✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11702
This commit is contained in:
Zhihe Li committed 2024-01-16 10:17:45 -05:00
1 parent 25c6ed6100
commit b8b970ce4d
12 files changed
+227 -35

No files matched your search

@@ -3,7 +3,7 @@
* SPDX-License-Identifier: MPL-2.0
*/
const netRequestPromise = require('../helpers/net-request-promise.js');
const { netRequest } = require('../helpers/request-promise.js');
// Runtime settings are any configuration, especially user-specified,
// set up at runtime. For example, the Boundary clusterUrl is a runtime setting.
@@ -36,7 +36,7 @@ class RuntimeSettings {
// test to see if the clusterUrl is API-compatible with the desktop client.
const scopesEndpoint = `${clusterUrl}/v1/scopes`;
try {
const result = await netRequestPromise(scopesEndpoint);
const result = await netRequest(scopesEndpoint);
// Redirects (3xx) are handled in the netRequest Promise, so we only
// throw an error for 4xx or 5xx responses.
if (result.statusCode >= 400) {