{"size": 670, "ext": "js", "max_stars_repo_path": "node_modules/@aws-sdk/signature-v4/dist/es/prepareRequest.js", "max_stars_repo_name": "Ayushk93/amplify_bootstrap", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "node_modules/@aws-sdk/signature-v4/dist/es/prepareRequest.js", "max_issues_repo_name": "Ayushk93/amplify_bootstrap", "max_issues_repo_issues_event_min_datetime": "2021-09-03T02:00:23.000Z", "max_issues_repo_issues_event_max_datetime": "2021-09-03T02:00:23.000Z", "max_forks_repo_path": "node_modules/@aws-sdk/signature-v4/dist/es/prepareRequest.js", "max_forks_repo_name": "Ayushk93/amplify_bootstrap", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": 1, "max_forks_count": null, "avg_line_length": 33.5, "max_line_length": 79, "alphanum_fraction": 0.6268656716}
import { cloneRequest } from "./cloneRequest";
import { GENERATED_HEADERS } from "./constants";
/**
 * @internal
 */
export function prepareRequest(request) {
    // Create a clone of the request object that does not clone the body
    request =
        typeof request.clone === "function"
            ? request.clone()
            : cloneRequest(request);
    for (var _i = 0, _a = Object.keys(request.headers); _i < _a.length; _i++) {
        var headerName = _a[_i];
        if (GENERATED_HEADERS.indexOf(headerName.toLowerCase()) > -1) {
            delete request.headers[headerName];
        }
    }
    return request;
}
//# sourceMappingURL=prepareRequest.js.map