How to use the node-libcurl.Easy function in node-libcurl

To help you get started, we’ve selected a few node-libcurl examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github 256cats / check-proxy / lib / curl.js View on Github external
function get(url, options) {
  var multi = new Multi();
  var curl = new Easy();
  curl.setOpt('URL', url);

  if(options.header) {
    curl.setOpt('HTTPHEADER', options.header);
  }

  if(options.cookie) {
    curl.setOpt('COOKIE', options.cookie);
  }

  curl.setOpt('FOLLOWLOCATION', true);
  curl.setOpt('HEADER', false);
  curl.setOpt('FORBID_REUSE', true);

  curl.setOpt('AUTOREFERER', true);
  curl.setOpt('SSL_VERIFYHOST', false);

node-libcurl

The fastest http(s) client (and much more) for Node.js - Node.js bindings for libcurl

MIT
Latest version published 3 months ago

Package Health Score

54 / 100
Full package analysis