got-scraping
Version:
HTTP client made for scraping based on got.
21 lines • 600 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.customOptionsHook = void 0;
function customOptionsHook(raw, options) {
const typedRaw = raw;
const names = [
'proxyUrl',
'headerGeneratorOptions',
'useHeaderGenerator',
'insecureHTTPParser',
'sessionToken',
];
for (const name of names) {
if (name in raw) {
options.context[name] = typedRaw[name];
delete typedRaw[name];
}
}
}
exports.customOptionsHook = customOptionsHook;
//# sourceMappingURL=custom-options.js.map