PHP 7.4.33
Preview: index.js Size: 717 B
/var/www/coop-podio-sms.bitkit.dk/httpdocs/node_modules/https-browserify/index.js
var http = require('http')
var url = require('url')

var https = module.exports

for (var key in http) {
  if (http.hasOwnProperty(key)) https[key] = http[key]
}

https.request = function (params, cb) {
  params = validateParams(params)
  return http.request.call(this, params, cb)
}

https.get = function (params, cb) {
  params = validateParams(params)
  return http.get.call(this, params, cb)
}

function validateParams (params) {
  if (typeof params === 'string') {
    params = url.parse(params)
  }
  if (!params.protocol) {
    params.protocol = 'https:'
  }
  if (params.protocol !== 'https:') {
    throw new Error('Protocol "' + params.protocol + '" not supported. Expected "https:"')
  }
  return params
}

Directory Contents

Dirs: 0 × Files: 4
Name Size Perms Modified Actions
717 B lrw-r--r-- 2017-04-04 23:30:45
Edit Download
1.08 KB lrw-r--r-- 2017-04-04 23:10:53
Edit Download
1.56 KB lrw-r--r-- 2024-05-28 16:34:57
Edit Download
373 B lrw-r--r-- 2017-04-04 23:16:32
Edit Download
If ZipArchive is unavailable, a .tar will be created (no compression).