1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | exports.prepareRequest = void 0;
|
4 | const cloneRequest_1 = require("./cloneRequest");
|
5 | const constants_1 = require("./constants");
|
6 | const prepareRequest = (request) => {
|
7 | request = typeof request.clone === "function" ? request.clone() : (0, cloneRequest_1.cloneRequest)(request);
|
8 | for (const headerName of Object.keys(request.headers)) {
|
9 | if (constants_1.GENERATED_HEADERS.indexOf(headerName.toLowerCase()) > -1) {
|
10 | delete request.headers[headerName];
|
11 | }
|
12 | }
|
13 | return request;
|
14 | };
|
15 | exports.prepareRequest = prepareRequest;
|