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.4.3 to 0.4.4

index.html

2

lib/needle.js

@@ -158,3 +158,3 @@ //////////////////////////////////////////

content_type: mime.type,
text: mime.type.indexOf('text/') != -1,
text: mime.type && mime.type.indexOf('text/') != -1,
charset: mime.charset

@@ -161,0 +161,0 @@ }

{
"name": "needle"
, "version": "0.4.3"
, "version": "0.4.4"
, "description": "Tiny yet feature-packed HTTP client. With multipart, charset decoding and proxy support."

@@ -5,0 +5,0 @@ , "keywords": ["http", "https", "simple", "client", "multipart", "upload", "proxy", "deflate", "timeout", "charset", "iconv"]

@@ -41,2 +41,3 @@ Needle

- `parse`: Whether to parse XML or JSON response bodies automagically. Defaults to `true`.
- `output`: Dump response output to file. When response is text, this occurs after parsing/decoding is done.

@@ -120,2 +121,10 @@ Note: To stay light on dependencies, Needle doesn't include the `xml2js` module used for XML parsing. To enable it, simply do `npm install xml2js`.

### GET binary, output to file
``` js
needle.get('http://upload.server.com/tux.png', { output: '/tmp/tux.png' }, function(err, resp, body){
// you can dump any response to a file, not only binaries.
});
```
### GET through proxy

@@ -122,0 +131,0 @@

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