Meteor http package replacement

I am updating a Meteor 1.12.2 project. One of the stumbling blocks is the Node.js request-based Meteor http package deprecation. The project makes extensive use of npmRequestOptions, including the ca and jar options to Node request. The ca option is used for specifying custom CA certificates; I can’t use the NODE_EXTRA_CA_CERTS Node.js option since the certs are determined at run-time.

At this point, I’m looking at three options:

  1. Import the old Meteor http package into the project’s packages directory.
  2. Figure out how to make node-fetch use custom CA certificates and manage cookies.
  3. Write something from scratch

Option 1 is by far the easiest, but how future-proof is it? Especially vis-a-vis recent versions of Node.js. I have been investigating option 2, but it looks hard and may be impossible. Option 3 is dark and full of terrors.

Use this instead of directly replace the http package in your local package folder

1 Like