Files
Basalt2/node_modules/search-insights/lib/utils/getRequesterForNode.ts
Robert Jelic 5c15cf28fa Test
2025-02-10 07:12:35 +01:00

14 lines
397 B
TypeScript

import { supportsNodeHttpModule } from "./featureDetection";
import type { RequestFnType } from "./request";
import { requestWithNodeHttpModule } from "./request";
export function getRequesterForNode(): RequestFnType {
if (supportsNodeHttpModule()) {
return requestWithNodeHttpModule;
}
throw new Error(
"Could not find a supported HTTP request client in this environment."
);
}