"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.ProxyAwareHTTPClient = void 0;
const axios_1 = __importDefault(require("axios"));
const axiosProxyConfig_1 = require("./axiosProxyConfig");
class ProxyAwareHTTPClient {
    async makeRequest(options) {
        const proxyConfig = await (0, axiosProxyConfig_1.currentProxyConfig)();
        const response = await (0, axios_1.default)({
            url: options.url,
            method: options.method,
            headers: options.headers,
            data: options.body,
            timeout: options.httpRequestTimeout,
            ...proxyConfig,
        });
        return {
            status: response.status,
            statusText: response.statusText,
        };
    }
}
exports.ProxyAwareHTTPClient = ProxyAwareHTTPClient;
