I'm writing a wrapper for a private api. This api only accepts https requests and thus I need to send https requests to make it work. I'm using browserify to bundle up the .js-files. The problem is that the https module seems to noe be loaded properly along with the other modules, like the http modules. After the code beneath has been run, the https
variable is undefined, while the http
variable is defined as one would expect. Any ideas on what could be wrong here?
function(require, module, exports){
(function (process,Buffer){
var optional = require('./lib/optional')
, http = require('http')
, https = optional('https');
// ...