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

node-fetch

Package Overview
Dependencies
Maintainers
2
Versions
96
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-fetch - npm Package Compare versions

Comparing version 2.0.0-alpha.5 to 2.0.0-alpha.6

3

CHANGELOG.md

@@ -22,2 +22,3 @@

- Other: update package.json script for npm 5
- Other: `encoding` module is now optional

@@ -37,2 +38,4 @@ ### HTTP requests

- Enhance: add experimental `response.blob()` (also applies to Requests)
- Enhance: `URLSearchParams` is now accepted as a body
- Enhance: wrap `response.json()` json parsing error as `FetchError`
- Fix: fix Request and Response with `null` body

@@ -39,0 +42,0 @@

7

package.json
{
"name": "node-fetch",
"version": "2.0.0-alpha.5",
"version": "2.0.0-alpha.6",
"description": "A light-weight module that brings window.fetch to node.js",

@@ -56,7 +56,6 @@ "main": "lib/index.js",

"rollup-plugin-babel": "^2.6.1",
"url-search-params": "^0.9.0",
"whatwg-url": "^4.0.0"
},
"dependencies": {
"encoding": "^0.1.11"
}
"dependencies": { }
}

@@ -140,2 +140,12 @@

// post form parameters (x-www-form-urlencoded)
import { URLSearchParams } from 'url';
const params = new URLSearchParams();
params.append('a', 1);
fetch('http://httpbin.org/post', { method: 'POST', body: params })
.then(res => res.json())
.then(json => console.log(json));
// post with form-data (detect multipart)

@@ -142,0 +152,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