{"_id":"@bmy/axios","_rev":"4-2f31de0ae58f3278311b297e0863fe7e","name":"@bmy/axios","dist-tags":{"latest":"0.19.3"},"versions":{"0.19.0":{"dependencies":{"follow-redirects":"1.5.10","is-buffer":"^2.0.2"},"deprecated":false,"description":"Promise based HTTP client for the browser and node.js","devDependencies":{"bundlesize":"^0.17.0","coveralls":"^3.0.0","es6-promise":"^4.2.4","grunt":"^1.0.2","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^20.1.0","grunt-karma":"^2.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^1.0.18","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1","karma":"^1.3.0","karma-chrome-launcher":"^2.2.0","karma-coverage":"^1.1.1","karma-firefox-launcher":"^1.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-opera-launcher":"^1.0.0","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^1.2.0","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.7","karma-webpack":"^1.7.0","load-grunt-tasks":"^3.5.2","minimist":"^1.2.0","mocha":"^5.2.0","sinon":"^4.5.0","typescript":"^2.8.1","url-search-params":"^0.10.0","webpack":"^1.13.1","webpack-dev-server":"^1.14.1"},"homepage":"https://github.com/axios/axios","keywords":["xhr","http","ajax","promise","node"],"main":"index.js","name":"@bmy/axios","scripts":{"build":"NODE_ENV=production grunt build","coveralls":"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js","examples":"node ./examples/server.js","fix":"eslint --fix lib/**/*.js","postversion":"git push && git push --tags","preversion":"npm test","start":"node ./sandbox/server.js","test":"grunt test && bundlesize","version":"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json"},"typings":"./index.d.ts","version":"0.19.0","_id":"@bmy/axios@0.19.0","_nodeVersion":"12.13.1","_npmVersion":"6.13.7","dist":{"integrity":"sha512-CVDcLMdZMZZY0dDO1iD7fTTkW5UFl3sN7AzVlHVXk6Pe1qr/uvCC9miR49BWbbYVLx5KXvqlQPaYCXpwATxfgw==","shasum":"d73cb8f83db06100e2ea306e9dc14df75cbda130","tarball":"https://registry.npmjs.org/@bmy/axios/-/axios-0.19.0.tgz","fileCount":40,"unpackedSize":330163,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJehaa8CRA9TVsSAnZWagAAcdoP/R6R0Rrf18Q0i+29mxNo\nPsObZZ6Z5O5YT+OHyIa+QY22QS2Emj3b0P4QWgL/jEG/cVSN6EzWa2doxKy6\nDhR6iBtSuSRYWyQDxRz87ZRpsLrw7mP+ERNWPtGOgZZZQzd8Oc60VEo18ck7\nmyqZV1txIbUXZn5BZ/+P0+Po8mTmZH0ny8vDHY3PhB+LxBD6isBk4Q9IuVB/\nsPqOIxMK9UmkyyHb5SwdVWeekbiFoJVA03RFock/v0YO8pxLMHB+Qt12dSse\nO1d06UJFIwe1IMcRkggxcMHTieyrOVcM0YzDpXtSteomIzHg0sCImOYWSIE2\naa6AyMeZcxxSHxX8wN8Q8SyV430kx6i+3LRU8kJYlaljXDNhIz1k65xhG4RE\nUSVwG8iPecVFQHjdLzBRbYHSZ9lWKBgYg/gQiJaO/iArKyU5OA0DztbcEvoq\n5QnFFkg3xCMst1cc8/wdzhd+FU2i/Bq/tVc1Q5aO/XuFaMTIA/S5ZKv+h8c+\nYYjU/rS9DppRYL9jiel4ws1ydxm3Nr7rtPGa7JmgkKjtwxK+JJXRkWhLQCEz\nRkqENWnX3QyaJFdfgbInd9tFYziMa6vYngNEKgujwIsf+9s4++oF/O7dMNQf\n6JDmjnSZFuuMcvJDEy1fECLJx9Ny6/zHQVQpUcbuUtPi7qJCSLlc+6glJ1Uc\nb5rx\r\n=W8ON\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAKfMa2hG4ShTA6rxowGChlmMVWDJchQuJr7Xft0JRrnAiAOMo1iXvokZr/uHnDb6Mw215sI/ZnNXI5GlbBLKpZweQ=="}]},"maintainers":[{"name":"bmy","email":"2271608011@qq.com"}],"_npmUser":{"name":"bmy","email":"2271608011@qq.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/axios_0.19.0_1585817275851_0.5873145085477272"},"_hasShrinkwrap":false},"0.19.1":{"dependencies":{"follow-redirects":"1.5.10","is-buffer":"^2.0.2"},"deprecated":false,"description":"Promise based HTTP client for the browser and node.js","devDependencies":{"bundlesize":"^0.17.0","coveralls":"^3.0.0","es6-promise":"^4.2.4","grunt":"^1.0.2","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^20.1.0","grunt-karma":"^2.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^1.0.18","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1","karma":"^1.3.0","karma-chrome-launcher":"^2.2.0","karma-coverage":"^1.1.1","karma-firefox-launcher":"^1.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-opera-launcher":"^1.0.0","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^1.2.0","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.7","karma-webpack":"^1.7.0","load-grunt-tasks":"^3.5.2","minimist":"^1.2.0","mocha":"^5.2.0","sinon":"^4.5.0","typescript":"^2.8.1","url-search-params":"^0.10.0","webpack":"^1.13.1","webpack-dev-server":"^1.14.1"},"homepage":"https://github.com/axios/axios","keywords":["xhr","http","ajax","promise","node"],"main":"index.js","name":"@bmy/axios","scripts":{"build":"NODE_ENV=production grunt build","coveralls":"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js","examples":"node ./examples/server.js","fix":"eslint --fix lib/**/*.js","postversion":"git push && git push --tags","preversion":"npm test","start":"node ./sandbox/server.js","test":"grunt test && bundlesize","version":"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json"},"typings":"./index.d.ts","version":"0.19.1","_id":"@bmy/axios@0.19.1","_nodeVersion":"12.13.1","_npmVersion":"6.13.7","dist":{"integrity":"sha512-B14uRsj9xdjFBBlZM4nNUwmKn6uQTIvpJdlj9l3BhHfBfsNR6rn6IBHLgn46pFi2ivqnxQtuNL1/Js1rI1x2Dg==","shasum":"8985747ec3d1eb0b6cfb8679a0f2213db355c70b","tarball":"https://registry.npmjs.org/@bmy/axios/-/axios-0.19.1.tgz","fileCount":40,"unpackedSize":330165,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJehaehCRA9TVsSAnZWagAAe/4P/3KIewBmBqFASZ7B9g2v\ndhGJaNqhXG1CvnGQJEQ4CGh7C9cvaVWIY9PlFU6MOU+U0fyRcfZfCjBJpZhJ\n8NgpqIYxPFIescOXmZ1UNJbAWBkMxXDgVV9pF5Lw1uMRVXLvNArKZO3VF7r/\n39uY2kFmqNRn99D9uL3vJNZhwijdohP7YbUT09w0r6rhlqM0vRoSXWpxmzI1\nEWGAGtOYLxRvrtMxuNV3xyYEM1YZbvO7XvT14cClKdVzi/ZnzVPArDDyJ3JI\n0tuK0igTE3AsHlg+LfDi2yPgwjgRStqrGa6UInD6KA7eSwA2q59Zpj+bqyCq\noFywwpcpcSY/EXrwqG9J+dMIh4oJd1F8YYjz9VB0mMlac9R5BwN+zvXCc4LQ\n9cKZY3eVU9rvRAuaNK1ii0eGWt09iwfNQnVafQzSiRyeJmH4fsPqxWcSplzz\nSeZR88ksKtX7rPSBgEH3FDSOxuCVr8bI5IjRwnQNwSsA04o4Q3mPSko0qAed\n4Xy6l56W5D5rZWn1+rO3zz4pWsE+2L2HfObacD34o1fLjz7zAGNWSExyI+O2\nnBxsEwDjImHzbeZC5LWS46ndgxXtCIPRPM2Ve6ZWFbFtWUEWKfSkI4MDWkbf\n4swKG6NQf/pcDT8T/DmjJ9Ha/EA9dI1C3nTkdLoqcmI3lHXMehgGGO6PcFDD\n0JZ8\r\n=6rRM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDuiuSeZrCCYFWQVQkvLhHOidkX7TJ+9F1F1CGomhXmyAiEAwvQHMmi73gVtwLySLKTiriKrT4vLSVQWJMCYyqFQaVA="}]},"maintainers":[{"name":"bmy","email":"2271608011@qq.com"}],"_npmUser":{"name":"bmy","email":"2271608011@qq.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/axios_0.19.1_1585817504725_0.779744304225672"},"_hasShrinkwrap":false},"0.19.2":{"dependencies":{"follow-redirects":"1.5.10","is-buffer":"^2.0.2"},"deprecated":false,"description":"Promise based HTTP client for the browser and node.js","devDependencies":{"bundlesize":"^0.17.0","coveralls":"^3.0.0","es6-promise":"^4.2.4","grunt":"^1.0.2","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^20.1.0","grunt-karma":"^2.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^1.0.18","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1","karma":"^1.3.0","karma-chrome-launcher":"^2.2.0","karma-coverage":"^1.1.1","karma-firefox-launcher":"^1.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-opera-launcher":"^1.0.0","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^1.2.0","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.7","karma-webpack":"^1.7.0","load-grunt-tasks":"^3.5.2","minimist":"^1.2.0","mocha":"^5.2.0","sinon":"^4.5.0","typescript":"^2.8.1","url-search-params":"^0.10.0","webpack":"^1.13.1","webpack-dev-server":"^1.14.1"},"homepage":"https://github.com/axios/axios","keywords":["xhr","http","ajax","promise","node"],"main":"index.js","name":"@bmy/axios","scripts":{"build":"NODE_ENV=production grunt build","coveralls":"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js","examples":"node ./examples/server.js","fix":"eslint --fix lib/**/*.js","postversion":"git push && git push --tags","preversion":"npm test","start":"node ./sandbox/server.js","test":"grunt test && bundlesize","version":"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json"},"typings":"./index.d.ts","version":"0.19.2","_id":"@bmy/axios@0.19.2","_nodeVersion":"12.13.1","_npmVersion":"6.13.7","dist":{"integrity":"sha512-CLxBc0qMYWbV/ZuY6YrHJEj3en7UNR0ev1JI8AME9rgL/xgelwQ/aPbM+TlGCmzkz7RwxUTpkRaEIYmCfcDOVg==","shasum":"e4a19011a570b02c05fb4682111353c5346840f9","tarball":"https://registry.npmjs.org/@bmy/axios/-/axios-0.19.2.tgz","fileCount":40,"unpackedSize":330475,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJehaoOCRA9TVsSAnZWagAA3AcQAJOT9QSsXlXFm/Uv6XHv\nX/bJvBW3CWOMdRwriAnWb6YHT2hGJ561XQ+dz3IHb4iJqDTe+iP+Hj49+h9A\nTxx2rEDnRUH2FA/lS3aPRpESC+syFlZo9msLnJuVNLNsioZGkykdYF0+qO2r\n7ghMGlQm+bTCgbW+MO/wnqYDeO+eo1dfZhjO6JX73jcAyACXCcVEWJLlLHCk\nK3/bUBo3ETM8crTAqMl6uC4xr2WYjqyWejTs4uaXpfN/wkFdk7nOjnKwxN3o\nJAfoWuxL6bzfjoQ9cyfJYBrOSghuLCMvcp169KVVFZkmJ7N2DClbNW9LdYMv\n8NByelMtFmuXm6vwY1XJNkvx47XPPTz8hzdcBSMxrlDT/+M+FjMTape/G+am\ngqNkdjNplCkJAbgFapgWz0E413MnC1dr+JWTkBHgeE3R00X5b01WFV0itqO1\nqrzsjAB1/D8xnrKHmhFUIGBsTtqPzK4Rmybs/V+kgB0pPEzYYFPz5dK5N5n3\nMB8cyyzIUDP83HmwCpSSqDAZKuZ9/GrMGlwpgOps9MIUNSWn0PJGdLxNIW47\ntxlRIVVV6xCaviLj6jid5PGSjLZiZsJfLxCj7+u/lEtxvOUs3/jx5DnIbAKT\nI0fyYXCpj2eOIo/r4LKpPK2DZ1S1AsuefFXBYz9ALsXXKzZqewCuAxW9aMo6\nxr9d\r\n=Mlnt\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIH2xBIkMAZHoQCGYfdvBVFEmeVbt2Z4pG46nIYiyIEOvAiEArB6JfUG7Xj1dZRzeYCRcTc+I+HQ42uWasg4llt7brZU="}]},"maintainers":[{"name":"bmy","email":"2271608011@qq.com"}],"_npmUser":{"name":"bmy","email":"2271608011@qq.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/axios_0.19.2_1585818126198_0.11066583355041382"},"_hasShrinkwrap":false},"0.19.3":{"dependencies":{"follow-redirects":"1.5.10","is-buffer":"^2.0.2"},"deprecated":false,"description":"Promise based HTTP client for the browser and node.js","devDependencies":{"bundlesize":"^0.17.0","coveralls":"^3.0.0","es6-promise":"^4.2.4","grunt":"^1.0.2","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^20.1.0","grunt-karma":"^2.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^1.0.18","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1","karma":"^1.3.0","karma-chrome-launcher":"^2.2.0","karma-coverage":"^1.1.1","karma-firefox-launcher":"^1.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-opera-launcher":"^1.0.0","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^1.2.0","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.7","karma-webpack":"^1.7.0","load-grunt-tasks":"^3.5.2","minimist":"^1.2.0","mocha":"^5.2.0","sinon":"^4.5.0","typescript":"^2.8.1","url-search-params":"^0.10.0","webpack":"^1.13.1","webpack-dev-server":"^1.14.1"},"homepage":"https://github.com/axios/axios","keywords":["xhr","http","ajax","promise","node"],"main":"index.js","name":"@bmy/axios","scripts":{"build":"NODE_ENV=production grunt build","coveralls":"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js","examples":"node ./examples/server.js","fix":"eslint --fix lib/**/*.js","postversion":"git push && git push --tags","preversion":"npm test","start":"node ./sandbox/server.js","test":"grunt test && bundlesize","version":"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json"},"typings":"./index.d.ts","version":"0.19.3","_id":"@bmy/axios@0.19.3","_nodeVersion":"12.13.1","_npmVersion":"6.13.7","dist":{"integrity":"sha512-Ha3WPvZs6uZeBSWhggLrodFj48G8mwYuw5UhGi2xZFDTWWOtCc2gZ7qN7lkd1iP6E55Bzst52T2RMM3T44OHKg==","shasum":"6e523051ebad78ff998fb42b6eba03988627919e","tarball":"https://registry.npmjs.org/@bmy/axios/-/axios-0.19.3.tgz","fileCount":40,"unpackedSize":330477,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJehatmCRA9TVsSAnZWagAAGqgP/ji0EPrB+kxozZX1b0G4\nM1+o9G8wecLYcn5PQ2caqvcVG3Ak2xyzUqxmFd+P/5cHunmjw2EvH6Wmnp7x\n2fMYZUVMK5fU88N4+9yf2L7WD/BvQ+8b9KTu31jOmSfXZwNR+9XGzuT0d5QL\n4aQ65sRdD8WFm2DynGWquErBmqUDSN6qizoZpS2PchQNdzfzZnClc4eviQFn\njlrt+CYeNG8kZqc+yYNEf+XBPFNfrFDdxRgdV7hlMIPadrIi1784C0oJWngt\n+3NenBue1bcajXIzFeB/1YycQd7szMKolH+6UmEJx7Ax7cRXYS/0BlQ79FJ+\nGyhcxjk83NJOrT8xRbWKk8a4RgjIi9uFvOyBqKu3nsMowYX0EHEAcVAKTe2h\n3ON6/wnA1S7aA7l3voaaII0rD3H03MUToXo/oKYzps/KoNwOF/B3bI5m8Q33\nkVQCedHvzNNtQqsQUrQib4EIPtbK/zodmxeP9CnN+JM0irpw4ruAnHelT7i8\nZleJbHn/SbypmL1u9MrpzhShAedQhJE/YQEnTGm+574mSMdpXmFaUTQPe8nH\nc64E9WaTroGWp9qAI2RoKxLf1xPaCjPhuP5t1gog4oKxVaRUjc/ZESVIguz4\n2RolQ+Ucfg4uADvJR6RJn7GpzDvXpUe0q7yi7CS7lkP7Eb3uEgk8iPHw4COF\ntl4d\r\n=If/x\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICkDmDTJpj45M3NcP8/3PsHopHg9d/VXwe4amdr2UdOsAiAks35z6AO8qhTcYkGJsl6NybkYGlbPSZSwLsUZthz/yg=="}]},"maintainers":[{"name":"bmy","email":"2271608011@qq.com"}],"_npmUser":{"name":"bmy","email":"2271608011@qq.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/axios_0.19.3_1585818469648_0.3345328085648722"},"_hasShrinkwrap":false}},"time":{"created":"2020-04-02T08:47:55.613Z","0.19.0":"2020-04-02T08:47:56.037Z","modified":"2022-04-04T19:53:13.969Z","0.19.1":"2020-04-02T08:51:44.838Z","0.19.2":"2020-04-02T09:02:06.359Z","0.19.3":"2020-04-02T09:07:49.955Z"},"maintainers":[{"name":"bmy","email":"2271608011@qq.com"}],"description":"Promise based HTTP client for the browser and node.js","homepage":"https://github.com/axios/axios","keywords":["xhr","http","ajax","promise","node"],"readme":"# axios\n\n[![npm version](https://img.shields.io/npm/v/axios.svg?style=flat-square)](https://www.npmjs.org/package/axios)\n[![build status](https://img.shields.io/travis/axios/axios.svg?style=flat-square)](https://travis-ci.org/axios/axios)\n[![code coverage](https://img.shields.io/coveralls/mzabriskie/axios.svg?style=flat-square)](https://coveralls.io/r/mzabriskie/axios)\n[![install size](https://packagephobia.now.sh/badge?p=axios)](https://packagephobia.now.sh/result?p=axios)\n[![npm downloads](https://img.shields.io/npm/dm/axios.svg?style=flat-square)](http://npm-stat.com/charts.html?package=axios)\n[![gitter chat](https://img.shields.io/gitter/room/mzabriskie/axios.svg?style=flat-square)](https://gitter.im/mzabriskie/axios)\n[![code helpers](https://www.codetriage.com/axios/axios/badges/users.svg)](https://www.codetriage.com/axios/axios)\n\nPromise based HTTP client for the browser and node.js\n\n## Features\n\n- Make [XMLHttpRequests](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest) from the browser\n- Make [http](http://nodejs.org/api/http.html) requests from node.js\n- Supports the [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) API\n- Intercept request and response\n- Transform request and response data\n- Cancel requests\n- Automatic transforms for JSON data\n- Client side support for protecting against [XSRF](http://en.wikipedia.org/wiki/Cross-site_request_forgery)\n\n## Browser Support\n\n![Chrome](https://raw.github.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png) | ![Firefox](https://raw.github.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png) | ![Safari](https://raw.github.com/alrra/browser-logos/master/src/safari/safari_48x48.png) | ![Opera](https://raw.github.com/alrra/browser-logos/master/src/opera/opera_48x48.png) | ![Edge](https://raw.github.com/alrra/browser-logos/master/src/edge/edge_48x48.png) | ![IE](https://raw.github.com/alrra/browser-logos/master/src/archive/internet-explorer_9-11/internet-explorer_9-11_48x48.png) |\n--- | --- | --- | --- | --- | --- |\nLatest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | 11 ✔ |\n\n[![Browser Matrix](https://saucelabs.com/open_sauce/build_matrix/axios.svg)](https://saucelabs.com/u/axios)\n\n## Installing\n\nUsing npm:\n\n```bash\n$ npm install axios\n```\n\nUsing bower:\n\n```bash\n$ bower install axios\n```\n\nUsing yarn:\n\n```bash\n$ yarn add axios\n```\n\nUsing cdn:\n\n```html\n<script src=\"https://unpkg.com/axios/dist/axios.min.js\"></script>\n```\n\n## Example\n\nPerforming a `GET` request\n\n```js\nconst axios = require('axios');\n\n// Make a request for a user with a given ID\naxios.get('/user?ID=12345')\n  .then(function (response) {\n    // handle success\n    console.log(response);\n  })\n  .catch(function (error) {\n    // handle error\n    console.log(error);\n  })\n  .finally(function () {\n    // always executed\n  });\n\n// Optionally the request above could also be done as\naxios.get('/user', {\n    params: {\n      ID: 12345\n    }\n  })\n  .then(function (response) {\n    console.log(response);\n  })\n  .catch(function (error) {\n    console.log(error);\n  })\n  .then(function () {\n    // always executed\n  });  \n\n// Want to use async/await? Add the `async` keyword to your outer function/method.\nasync function getUser() {\n  try {\n    const response = await axios.get('/user?ID=12345');\n    console.log(response);\n  } catch (error) {\n    console.error(error);\n  }\n}\n```\n\n> **NOTE:** `async/await` is part of ECMAScript 2017 and is not supported in Internet\n> Explorer and older browsers, so use with caution.\n\nPerforming a `POST` request\n\n```js\naxios.post('/user', {\n    firstName: 'Fred',\n    lastName: 'Flintstone'\n  })\n  .then(function (response) {\n    console.log(response);\n  })\n  .catch(function (error) {\n    console.log(error);\n  });\n```\n\nPerforming multiple concurrent requests\n\n```js\nfunction getUserAccount() {\n  return axios.get('/user/12345');\n}\n\nfunction getUserPermissions() {\n  return axios.get('/user/12345/permissions');\n}\n\naxios.all([getUserAccount(), getUserPermissions()])\n  .then(axios.spread(function (acct, perms) {\n    // Both requests are now complete\n  }));\n```\n\n## axios API\n\nRequests can be made by passing the relevant config to `axios`.\n\n##### axios(config)\n\n```js\n// Send a POST request\naxios({\n  method: 'post',\n  url: '/user/12345',\n  data: {\n    firstName: 'Fred',\n    lastName: 'Flintstone'\n  }\n});\n```\n\n```js\n// GET request for remote image\naxios({\n  method: 'get',\n  url: 'http://bit.ly/2mTM3nY',\n  responseType: 'stream'\n})\n  .then(function (response) {\n    response.data.pipe(fs.createWriteStream('ada_lovelace.jpg'))\n  });\n```\n\n##### axios(url[, config])\n\n```js\n// Send a GET request (default method)\naxios('/user/12345');\n```\n\n### Request method aliases\n\nFor convenience aliases have been provided for all supported request methods.\n\n##### axios.request(config)\n##### axios.get(url[, config])\n##### axios.delete(url[, config])\n##### axios.head(url[, config])\n##### axios.options(url[, config])\n##### axios.post(url[, data[, config]])\n##### axios.put(url[, data[, config]])\n##### axios.patch(url[, data[, config]])\n\n###### NOTE\nWhen using the alias methods `url`, `method`, and `data` properties don't need to be specified in config.\n\n### Concurrency\n\nHelper functions for dealing with concurrent requests.\n\n##### axios.all(iterable)\n##### axios.spread(callback)\n\n### Creating an instance\n\nYou can create a new instance of axios with a custom config.\n\n##### axios.create([config])\n\n```js\nconst instance = axios.create({\n  baseURL: 'https://some-domain.com/api/',\n  timeout: 1000,\n  headers: {'X-Custom-Header': 'foobar'}\n});\n```\n\n### Instance methods\n\nThe available instance methods are listed below. The specified config will be merged with the instance config.\n\n##### axios#request(config)\n##### axios#get(url[, config])\n##### axios#delete(url[, config])\n##### axios#head(url[, config])\n##### axios#options(url[, config])\n##### axios#post(url[, data[, config]])\n##### axios#put(url[, data[, config]])\n##### axios#patch(url[, data[, config]])\n##### axios#getUri([config])\n\n## Request Config\n\nThese are the available config options for making requests. Only the `url` is required. Requests will default to `GET` if `method` is not specified.\n\n```js\n{\n  // `url` is the server URL that will be used for the request\n  url: '/user',\n\n  // `method` is the request method to be used when making the request\n  method: 'get', // default\n\n  // `baseURL` will be prepended to `url` unless `url` is absolute.\n  // It can be convenient to set `baseURL` for an instance of axios to pass relative URLs\n  // to methods of that instance.\n  baseURL: 'https://some-domain.com/api/',\n\n  // `transformRequest` allows changes to the request data before it is sent to the server\n  // This is only applicable for request methods 'PUT', 'POST', 'PATCH' and 'DELETE'\n  // The last function in the array must return a string or an instance of Buffer, ArrayBuffer,\n  // FormData or Stream\n  // You may modify the headers object.\n  transformRequest: [function (data, headers) {\n    // Do whatever you want to transform the data\n\n    return data;\n  }],\n\n  // `transformResponse` allows changes to the response data to be made before\n  // it is passed to then/catch\n  transformResponse: [function (data) {\n    // Do whatever you want to transform the data\n\n    return data;\n  }],\n\n  // `headers` are custom headers to be sent\n  headers: {'X-Requested-With': 'XMLHttpRequest'},\n\n  // `params` are the URL parameters to be sent with the request\n  // Must be a plain object or a URLSearchParams object\n  params: {\n    ID: 12345\n  },\n\n  // `paramsSerializer` is an optional function in charge of serializing `params`\n  // (e.g. https://www.npmjs.com/package/qs, http://api.jquery.com/jquery.param/)\n  paramsSerializer: function (params) {\n    return Qs.stringify(params, {arrayFormat: 'brackets'})\n  },\n\n  // `data` is the data to be sent as the request body\n  // Only applicable for request methods 'PUT', 'POST', and 'PATCH'\n  // When no `transformRequest` is set, must be of one of the following types:\n  // - string, plain object, ArrayBuffer, ArrayBufferView, URLSearchParams\n  // - Browser only: FormData, File, Blob\n  // - Node only: Stream, Buffer\n  data: {\n    firstName: 'Fred'\n  },\n\n  // `timeout` specifies the number of milliseconds before the request times out.\n  // If the request takes longer than `timeout`, the request will be aborted.\n  timeout: 1000, // default is `0` (no timeout)\n\n  // `withCredentials` indicates whether or not cross-site Access-Control requests\n  // should be made using credentials\n  withCredentials: false, // default\n\n  // `adapter` allows custom handling of requests which makes testing easier.\n  // Return a promise and supply a valid response (see lib/adapters/README.md).\n  adapter: function (config) {\n    /* ... */\n  },\n\n  // `auth` indicates that HTTP Basic auth should be used, and supplies credentials.\n  // This will set an `Authorization` header, overwriting any existing\n  // `Authorization` custom headers you have set using `headers`.\n  // Please note that only HTTP Basic auth is configurable through this parameter.\n  // For Bearer tokens and such, use `Authorization` custom headers instead.\n  auth: {\n    username: 'janedoe',\n    password: 's00pers3cret'\n  },\n\n  // `responseType` indicates the type of data that the server will respond with\n  // options are: 'arraybuffer', 'document', 'json', 'text', 'stream'\n  //   browser only: 'blob'\n  responseType: 'json', // default\n\n  // `responseEncoding` indicates encoding to use for decoding responses\n  // Note: Ignored for `responseType` of 'stream' or client-side requests\n  responseEncoding: 'utf8', // default\n\n  // `xsrfCookieName` is the name of the cookie to use as a value for xsrf token\n  xsrfCookieName: 'XSRF-TOKEN', // default\n\n  // `xsrfHeaderName` is the name of the http header that carries the xsrf token value\n  xsrfHeaderName: 'X-XSRF-TOKEN', // default\n\n  // `onUploadProgress` allows handling of progress events for uploads\n  onUploadProgress: function (progressEvent) {\n    // Do whatever you want with the native progress event\n  },\n\n  // `onDownloadProgress` allows handling of progress events for downloads\n  onDownloadProgress: function (progressEvent) {\n    // Do whatever you want with the native progress event\n  },\n\n  // `maxContentLength` defines the max size of the http response content in bytes allowed\n  maxContentLength: 2000,\n\n  // `validateStatus` defines whether to resolve or reject the promise for a given\n  // HTTP response status code. If `validateStatus` returns `true` (or is set to `null`\n  // or `undefined`), the promise will be resolved; otherwise, the promise will be\n  // rejected.\n  validateStatus: function (status) {\n    return status >= 200 && status < 300; // default\n  },\n\n  // `maxRedirects` defines the maximum number of redirects to follow in node.js.\n  // If set to 0, no redirects will be followed.\n  maxRedirects: 5, // default\n\n  // `socketPath` defines a UNIX Socket to be used in node.js.\n  // e.g. '/var/run/docker.sock' to send requests to the docker daemon.\n  // Only either `socketPath` or `proxy` can be specified.\n  // If both are specified, `socketPath` is used.\n  socketPath: null, // default\n\n  // `httpAgent` and `httpsAgent` define a custom agent to be used when performing http\n  // and https requests, respectively, in node.js. This allows options to be added like\n  // `keepAlive` that are not enabled by default.\n  httpAgent: new http.Agent({ keepAlive: true }),\n  httpsAgent: new https.Agent({ keepAlive: true }),\n\n  // 'proxy' defines the hostname and port of the proxy server.\n  // You can also define your proxy using the conventional `http_proxy` and\n  // `https_proxy` environment variables. If you are using environment variables\n  // for your proxy configuration, you can also define a `no_proxy` environment\n  // variable as a comma-separated list of domains that should not be proxied.\n  // Use `false` to disable proxies, ignoring environment variables.\n  // `auth` indicates that HTTP Basic auth should be used to connect to the proxy, and\n  // supplies credentials.\n  // This will set an `Proxy-Authorization` header, overwriting any existing\n  // `Proxy-Authorization` custom headers you have set using `headers`.\n  proxy: {\n    host: '127.0.0.1',\n    port: 9000,\n    auth: {\n      username: 'mikeymike',\n      password: 'rapunz3l'\n    }\n  },\n\n  // `cancelToken` specifies a cancel token that can be used to cancel the request\n  // (see Cancellation section below for details)\n  cancelToken: new CancelToken(function (cancel) {\n  })\n}\n```\n\n## Response Schema\n\nThe response for a request contains the following information.\n\n```js\n{\n  // `data` is the response that was provided by the server\n  data: {},\n\n  // `status` is the HTTP status code from the server response\n  status: 200,\n\n  // `statusText` is the HTTP status message from the server response\n  statusText: 'OK',\n\n  // `headers` the headers that the server responded with\n  // All header names are lower cased\n  headers: {},\n\n  // `config` is the config that was provided to `axios` for the request\n  config: {},\n\n  // `request` is the request that generated this response\n  // It is the last ClientRequest instance in node.js (in redirects)\n  // and an XMLHttpRequest instance the browser\n  request: {}\n}\n```\n\nWhen using `then`, you will receive the response as follows:\n\n```js\naxios.get('/user/12345')\n  .then(function (response) {\n    console.log(response.data);\n    console.log(response.status);\n    console.log(response.statusText);\n    console.log(response.headers);\n    console.log(response.config);\n  });\n```\n\nWhen using `catch`, or passing a [rejection callback](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/then) as second parameter of `then`, the response will be available through the `error` object as explained in the [Handling Errors](#handling-errors) section.\n\n## Config Defaults\n\nYou can specify config defaults that will be applied to every request.\n\n### Global axios defaults\n\n```js\naxios.defaults.baseURL = 'https://api.example.com';\naxios.defaults.headers.common['Authorization'] = AUTH_TOKEN;\naxios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded';\n```\n\n### Custom instance defaults\n\n```js\n// Set config defaults when creating the instance\nconst instance = axios.create({\n  baseURL: 'https://api.example.com'\n});\n\n// Alter defaults after instance has been created\ninstance.defaults.headers.common['Authorization'] = AUTH_TOKEN;\n```\n\n### Config order of precedence\n\nConfig will be merged with an order of precedence. The order is library defaults found in [lib/defaults.js](https://github.com/axios/axios/blob/master/lib/defaults.js#L28), then `defaults` property of the instance, and finally `config` argument for the request. The latter will take precedence over the former. Here's an example.\n\n```js\n// Create an instance using the config defaults provided by the library\n// At this point the timeout config value is `0` as is the default for the library\nconst instance = axios.create();\n\n// Override timeout default for the library\n// Now all requests using this instance will wait 2.5 seconds before timing out\ninstance.defaults.timeout = 2500;\n\n// Override timeout for this request as it's known to take a long time\ninstance.get('/longRequest', {\n  timeout: 5000\n});\n```\n\n## Interceptors\n\nYou can intercept requests or responses before they are handled by `then` or `catch`.\n\n```js\n// Add a request interceptor\naxios.interceptors.request.use(function (config) {\n    // Do something before request is sent\n    return config;\n  }, function (error) {\n    // Do something with request error\n    return Promise.reject(error);\n  });\n\n// Add a response interceptor\naxios.interceptors.response.use(function (response) {\n    // Do something with response data\n    return response;\n  }, function (error) {\n    // Do something with response error\n    return Promise.reject(error);\n  });\n```\n\nIf you may need to remove an interceptor later you can.\n\n```js\nconst myInterceptor = axios.interceptors.request.use(function () {/*...*/});\naxios.interceptors.request.eject(myInterceptor);\n```\n\nYou can add interceptors to a custom instance of axios.\n\n```js\nconst instance = axios.create();\ninstance.interceptors.request.use(function () {/*...*/});\n```\n\n## Handling Errors\n\n```js\naxios.get('/user/12345')\n  .catch(function (error) {\n    if (error.response) {\n      // The request was made and the server responded with a status code\n      // that falls out of the range of 2xx\n      console.log(error.response.data);\n      console.log(error.response.status);\n      console.log(error.response.headers);\n    } else if (error.request) {\n      // The request was made but no response was received\n      // `error.request` is an instance of XMLHttpRequest in the browser and an instance of\n      // http.ClientRequest in node.js\n      console.log(error.request);\n    } else {\n      // Something happened in setting up the request that triggered an Error\n      console.log('Error', error.message);\n    }\n    console.log(error.config);\n  });\n```\n\nYou can define a custom HTTP status code error range using the `validateStatus` config option.\n\n```js\naxios.get('/user/12345', {\n  validateStatus: function (status) {\n    return status < 500; // Reject only if the status code is greater than or equal to 500\n  }\n})\n```\n\n## Cancellation\n\nYou can cancel a request using a *cancel token*.\n\n> The axios cancel token API is based on the withdrawn [cancelable promises proposal](https://github.com/tc39/proposal-cancelable-promises).\n\nYou can create a cancel token using the `CancelToken.source` factory as shown below:\n\n```js\nconst CancelToken = axios.CancelToken;\nconst source = CancelToken.source();\n\naxios.get('/user/12345', {\n  cancelToken: source.token\n}).catch(function (thrown) {\n  if (axios.isCancel(thrown)) {\n    console.log('Request canceled', thrown.message);\n  } else {\n    // handle error\n  }\n});\n\naxios.post('/user/12345', {\n  name: 'new name'\n}, {\n  cancelToken: source.token\n})\n\n// cancel the request (the message parameter is optional)\nsource.cancel('Operation canceled by the user.');\n```\n\nYou can also create a cancel token by passing an executor function to the `CancelToken` constructor:\n\n```js\nconst CancelToken = axios.CancelToken;\nlet cancel;\n\naxios.get('/user/12345', {\n  cancelToken: new CancelToken(function executor(c) {\n    // An executor function receives a cancel function as a parameter\n    cancel = c;\n  })\n});\n\n// cancel the request\ncancel();\n```\n\n> Note: you can cancel several requests with the same cancel token.\n\n## Using application/x-www-form-urlencoded format\n\nBy default, axios serializes JavaScript objects to `JSON`. To send data in the `application/x-www-form-urlencoded` format instead, you can use one of the following options.\n\n### Browser\n\nIn a browser, you can use the [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) API as follows:\n\n```js\nconst params = new URLSearchParams();\nparams.append('param1', 'value1');\nparams.append('param2', 'value2');\naxios.post('/foo', params);\n```\n\n> Note that `URLSearchParams` is not supported by all browsers (see [caniuse.com](http://www.caniuse.com/#feat=urlsearchparams)), but there is a [polyfill](https://github.com/WebReflection/url-search-params) available (make sure to polyfill the global environment).\n\nAlternatively, you can encode data using the [`qs`](https://github.com/ljharb/qs) library:\n\n```js\nconst qs = require('qs');\naxios.post('/foo', qs.stringify({ 'bar': 123 }));\n```\n\nOr in another way (ES6),\n\n```js\nimport qs from 'qs';\nconst data = { 'bar': 123 };\nconst options = {\n  method: 'POST',\n  headers: { 'content-type': 'application/x-www-form-urlencoded' },\n  data: qs.stringify(data),\n  url,\n};\naxios(options);\n```\n\n### Node.js\n\nIn node.js, you can use the [`querystring`](https://nodejs.org/api/querystring.html) module as follows:\n\n```js\nconst querystring = require('querystring');\naxios.post('http://something.com/', querystring.stringify({ foo: 'bar' }));\n```\n\nYou can also use the [`qs`](https://github.com/ljharb/qs) library.\n\n###### NOTE\nThe `qs` library is preferable if you need to stringify nested objects, as the `querystring` method has known issues with that use case (https://github.com/nodejs/node-v0.x-archive/issues/1665).\n\n## Semver\n\nUntil axios reaches a `1.0` release, breaking changes will be released with a new minor version. For example `0.5.1`, and `0.5.4` will have the same API, but `0.6.0` will have breaking changes.\n\n## Promises\n\naxios depends on a native ES6 Promise implementation to be [supported](http://caniuse.com/promises).\nIf your environment doesn't support ES6 Promises, you can [polyfill](https://github.com/jakearchibald/es6-promise).\n\n## TypeScript\naxios includes [TypeScript](http://typescriptlang.org) definitions.\n```typescript\nimport axios from 'axios';\naxios.get('/user?ID=12345');\n```\n\n## Resources\n\n* [Changelog](https://github.com/axios/axios/blob/master/CHANGELOG.md)\n* [Upgrade Guide](https://github.com/axios/axios/blob/master/UPGRADE_GUIDE.md)\n* [Ecosystem](https://github.com/axios/axios/blob/master/ECOSYSTEM.md)\n* [Contributing Guide](https://github.com/axios/axios/blob/master/CONTRIBUTING.md)\n* [Code of Conduct](https://github.com/axios/axios/blob/master/CODE_OF_CONDUCT.md)\n\n## Credits\n\naxios is heavily inspired by the [$http service](https://docs.angularjs.org/api/ng/service/$http) provided in [Angular](https://angularjs.org/). Ultimately axios is an effort to provide a standalone `$http`-like service for use outside of Angular.\n\n## License\n\nMIT\n","readmeFilename":"README.md"}