Got: Example from readme doesn't seem to work

Created on 1 Sep 2017  路  3Comments  路  Source: sindresorhus/got

Tried to use the example below but it doesn't seem to work with 7.1.0. The on method is not defined.

Note: Progress events can also be used with promises.

got('todomvc.com')
  .on('downloadProgress', progress => {
      // Report download progress
  })
  .on('uploadProgress', progress => {
      // Report upload progress
  })
  .then(response => {
      // Done
  });

Most helpful comment

Oops. I found out why. The commit is after the 7.1.0 release. It would be awesome to use this feature.

@sindresorhus Is a 7.2.0 release coming soon or should I use a more complicated approach?

All 3 comments

Oops. I found out why. The commit is after the 7.1.0 release. It would be awesome to use this feature.

@sindresorhus Is a 7.2.0 release coming soon or should I use a more complicated approach?

I'm also curious what the status of the new release is! Is there a roadmap we can see or somehow we can help finish it?

Closing as v8 is the latest release now.

Was this page helpful?
0 / 5 - 0 ratings