Skip to content

v4.0.0

Compare
Choose a tag to compare
@thinkingserious thinkingserious released this 02 Aug 20:14

Breaking Change

Fixed

Added

  • Extracted some logic into helpers
  • Using a getEmptyRequest helper to avoid code duplication
  • emtpyRequest now accepts an object with data to extend the empty request with, this will allow simpler syntax for initializing requests.
  • Callback function now receives two parameters as per Node conventions (error, response)
  • If no callback provided, the method will return a promise instead.
  • Implemented promise API when not passing a callback function
  • Using native Promise by default if present, but allow users to override this with any other implementation by setting Sendgrid.Promise to any value, e.g. Sendgrid.Promise = require('bluebird')