Skip to content

Commit

Permalink
feat: initial refactor for v4
Browse files Browse the repository at this point in the history
  • Loading branch information
tlawrie committed Aug 7, 2024
1 parent e3580e7 commit 3316c42
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions commands/http.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import URL from "url";
import fs from "fs";
import HTTPRetryRequest from "../libs/HTTPRetryRequest";
import { checkIfEmpty, HEADERS, HEADERVALUES } from "../libs/utilities";
import CacheableLookup from "cacheable-lookup";

/**
* @todo implement a fetch that takes in;
Expand Down Expand Up @@ -195,6 +196,8 @@ export function execute() {
opts.headers = {
...headerObject,
};
const cacheable = new CacheableLookup();
opts.lookup = cacheable.lookup;

log.sys("Commencing to execute HTTP call with", reqURL, JSON.stringify(opts));

Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
"shelljs": "^0.8.5",
"twilio": "^5.2.2",
"url": "^0.11.0",
"wait-on": "^7.2.0"
"wait-on": "^7.2.0",
"cacheable-lookup": "^7.0.0"
},
"scripts": {
"test": "cross-env NODE_ENV=test mocha tests/**/*.spec.js",
Expand Down

0 comments on commit 3316c42

Please sign in to comment.