I cannot find any information anywhere on how to make an http call from within a MongoDB Atlas function. Here’s what I have tried so far:
- node-fetch - fails installation, cannot add to the dependencies list.
- axios - idem.
- I found some vague mentions of MongoDB Atlas providing its own
httplibrary and I have tried the following to import it:
const http = context.services.get("http");
This has failed with an error:
Error: Cannot access member 'get' of undefined
Nothing else comes to mind. So how to make an http request from a MongoDB Atlas function?