Packages

got

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

Your version

2.7.0

6 Apr 2015Where it was published

2.9.2 is the newest release of 2.x.

Security

1 advisory affects 2.7.0; 11.8.5 fixes them

Release note

New json option for auto-parsing JSON response. abdd0f0

Before:

got('jsonendpoint.com', function (err, data) {
    if (err) { return cb(err); }

    var json;

    try {
        json = JSON.parse(data);
    } catch (e) {
        return cb(new Error('Reponse from jsonendpoint.com is broken: ' + e.message));
    }

    // working with json
});

After:

got('jsonendpoint.com', {json: true}, function (err, json) {
    if (err) { return cb(err); }

    // working with json
});

v2.6.0...v2.7.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.