Files
Basalt2/node_modules/search-insights/lib/utils/getRequesterForNode.ts
Robert Jelic b0a4a6da9c Vitepress
2025-02-10 06:53:23 +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."
);
}