Packages

got

16.2.0 · 30 Oct 2026MIT53.2M / weekRepositoryHomepagenpmAtom feed

Your version

6.0.0

major7 Jan 2016Where it was published

6.7.1 is the newest release of 6.x.

Security

1 advisory affects 6.0.0; 11.8.5 fixes them

Release note

Aiming on Node.js 4

This release drops Node.js 0.10/0.12 support, so we replaced lots of modules and reduce dependency tree more than twice (see PR overview). Module folder size reduced from 1.1 MB to 216 KB.

For older Node.js versions we will still maintain v5.x for critical bug-fixes.

Promises by default

Callback interface was replaced by Promises, because it is a better way to work with asynchronous operations and they can be used with yield/await nicely.

If you use callback before:

got('todomvc.com', (err, body) => {
    if (err) {
        console.log(err);
        return;
    }

    console.log(body);
});

You can rewrite it this way:

got('todomvc.com')
    .then(res => {
        console.log(res.body);
    })
    .catch(err => {
        console.log(err);
    });

You can read more about Promises in "ECMAScript 6 promises (2/2): the API" post and some caveats in "We have a problem with promises".

Update

$ npm install --save got@6

Changes

v5.3.0...v6.0.0

A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.