diff --git a/lib/services/tastytrade-http-client.ts b/lib/services/tastytrade-http-client.ts index cda2304..1556830 100644 --- a/lib/services/tastytrade-http-client.ts +++ b/lib/services/tastytrade-http-client.ts @@ -3,8 +3,6 @@ import axios from "axios" import qs from 'qs' import { recursiveDasherizeKeys } from "../utils/json-util" import _ from 'lodash' -import https from 'https' -import { MinTlsVersion } from "../utils/constants" const ParamsSerializer = { serialize: function (queryParams: object) { @@ -14,11 +12,9 @@ const ParamsSerializer = { export default class TastytradeHttpClient{ public readonly session: TastytradeSession - private readonly httpsAgent: https.Agent constructor(private readonly baseUrl: string) { this.session = new TastytradeSession() - this.httpsAgent = new https.Agent({ minVersion: MinTlsVersion }) } private getDefaultHeaders(): any { @@ -42,8 +38,7 @@ export default class TastytradeHttpClient{ data: dasherizedData, headers: mergedHeaders, params: dasherizedParams, - paramsSerializer: ParamsSerializer, - httpsAgent: this.httpsAgent + paramsSerializer: ParamsSerializer }, _.isEmpty) return axios.request(config) diff --git a/lib/utils/constants.ts b/lib/utils/constants.ts deleted file mode 100644 index e368e1f..0000000 --- a/lib/utils/constants.ts +++ /dev/null @@ -1 +0,0 @@ -export const MinTlsVersion = 'TLSv1.2' \ No newline at end of file