Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

curlrequest

Package Overview
Dependencies
Maintainers
1
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

curlrequest - npm Package Compare versions

Comparing version 0.2.4 to 0.2.5

9

index.js

@@ -21,4 +21,5 @@ var child = require('child_process')

var user_agents = fs.readFileSync('useragents.txt').toString().split('\n').slice(0, -1)
, user_agent_len = user_agents.length;
var ua_file = __dirname + '/useragents.txt'
, user_agents = fs.readFileSync(ua_file).toString().split('\n').slice(0, -1)
, user_agents_len = user_agents.length;

@@ -66,3 +67,3 @@ /**

return (function curl() {
module.exports(options, function (err) {
exports.request(options, function (err) {
if (!err || !--remaining) {

@@ -190,3 +191,3 @@ return callback.apply(this, arguments);

if (!headers['User-Agent'] && !options['user-agent']) {
options['user-agent'] = user_agents[Math.random() * user_agent_len | 0];
options['user-agent'] = user_agents[Math.random() * user_agents_len | 0];
}

@@ -193,0 +194,0 @@

{ "name" : "curlrequest",
"description" : "A curl wrapper for node",
"version" : "0.2.4",
"version" : "0.2.5",
"homepage" : "https://github.com/chriso/curlrequest",

@@ -5,0 +5,0 @@ "author" : "Chris O'Hara <cohara87@gmail.com>",

@@ -88,3 +88,3 @@ **curlrequest** is a node wrapper for the command line **curl(1)**

#### Passing options directly to curl
### Passing options directly to curl

@@ -111,9 +111,9 @@ Any additional options are sent as command line options to curl. See `man

url: 'example.com/some/large/file.zip'
, 'limit-rate': '500k' //500kb/s
, encoding: null //return a buffer
, 'limit-rate': '500k'
, encoding: null
}
curl.request(options, function (err, file) {
//...
//file is a Buffer
})
```
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc