Socket
Socket
Sign inDemoInstall

needle

Package Overview
Dependencies
Maintainers
1
Versions
112
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

needle - npm Package Compare versions

Comparing version 0.2.4 to 0.2.6

7

lib/needle.js

@@ -110,6 +110,7 @@ //////////////////////////////////////////

method: method,
headers: headers,
agent: options.agent || http.globalAgent
headers: headers
}
if (typeof options.agent != 'undefined') http_opts.agent = options.agent;
if(data) {

@@ -243,3 +244,3 @@ if(options.multipart){

var filename = part.filename || part.file ? path.basename(part.file) : name;
var filename = part.filename ? part.filename : part.file ? path.basename(part.file) : name;
if(part.buffer) return append(part.buffer, filename);

@@ -246,0 +247,0 @@

{
"name": "needle"
, "version": "0.2.4"
, "version": "0.2.6"
, "description": "Tiny yet featureful HTTP client. With deflate & multipart POST support."

@@ -5,0 +5,0 @@ , "keywords": ["http", "https", "client", "multipart", "deflate", "timeout", "basic-auth", "simple"]

@@ -14,2 +14,3 @@ Needle

client.get(url, [options], callback);
client.head(url, [options], callback);
client.post(url, data, [options], callback);

@@ -16,0 +17,0 @@ client.put(url, data, [options], callback);

@@ -60,3 +60,3 @@ // TODO: write specs. :)

},
pixel: { filename:'black_pixel.gif', buffer: black_pixel, content_type: 'image/gif' },
pixel: { filename: 'black_pixel.gif', buffer: black_pixel, content_type: 'image/gif' },
}

@@ -94,4 +94,12 @@

break;
case 'all':
simple_head();
simple_get();
auth_get();
proxy_get();
simple_post('http://posttestserver.com/post.php');
multipart_post('http://posttestserver.com/post.php?dir=example');
break;
default:
console.log("Usage: ./test.js [head|get|auth|proxy|multipart]")
}
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