5.0.0 - 2020-09-02
Changed
We have replaced the use of the npm request-promise package with axios as the npm request package has been deprecated. This makes the following breaking changes:
-
The response
object
returned by a successful API call is now in the form of an axios response. This has a different interface to a request response. For example:
response.body
becomes response.data
response.statusCode
becomes response.status
-
The err
object
returned by an unsuccessful API call has a different interface. For example, err.error
becomes err.response.data
. See the axios documentation for further details on error handling.
-
To configure the use of a proxy you should pass the proxy configuration as an object
rather than a URL. For details, see the axios client.
-
We now return native promises rather than bluebird promises. You will not need to make any changes unless you are using some of the additional methods found on bluebird promises that do not exist on native promises.