Files
fetch-blob-fixed/README.md
T
2020-02-13 21:48:24 +13:00

1.3 KiB

fetch-blob

npm version build status coverage status install size

A Blob implementation in Node.js, originally from node-fetch.

Usage

$ npm install fetch-blob
const Blob = require('fetch-blob');
const fetch = require('node-fetch');
fetch('https://httpbin.org/post', {
        method: 'POST',
        body: new Blob(['hello'], { type: 'text/plain' })
    })
    .then(res => res.json()) // expecting a json response
    .then(json => console.log(json));

See MDN doc and Tests for more details.