axios 0.16.1 → 0.16.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of axios might be problematic. Click here for more details.

package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ### 0.16.2 (Jun 3, 2017)
4
+
5
+ - Fixing issue with including `buffer` in bundle ([#887](https://github.com/mzabriskie/axios/pull/887))
6
+ - Including underlying request in errors ([#830](https://github.com/mzabriskie/axios/pull/830))
7
+ - Convert `method` to lowercase ([#930](https://github.com/mzabriskie/axios/pull/930))
8
+
3
9
  ### 0.16.1 (Apr 8, 2017)
4
10
 
5
11
  - Improving HTTP adapter to return last request in case of redirects ([#828](https://github.com/mzabriskie/axios/pull/828))
package/README.md CHANGED
@@ -469,11 +469,16 @@ instance.interceptors.request.use(function () {/*...*/});
469
469
  axios.get('/user/12345')
470
470
  .catch(function (error) {
471
471
  if (error.response) {
472
- // The request was made, but the server responded with a status code
472
+ // The request was made and the server responded with a status code
473
473
  // that falls out of the range of 2xx
474
474
  console.log(error.response.data);
475
475
  console.log(error.response.status);
476
476
  console.log(error.response.headers);
477
+ } else if (error.request) {
478
+ // The request was made but no response was received
479
+ // `error.request` is an instance of XMLHttpRequest in the browser and an instance of
480
+ // http.ClientRequest in node.js
481
+ console.log(error.request);
477
482
  } else {
478
483
  // Something happened in setting up the request that triggered an Error
479
484
  console.log('Error', error.message);