7fca789aa031d99fe25ebe598deab4ccbc4b122e392ef4070a99b745209224fc67b6f9a95c1c842c9205301e4190e82d359a2f17871a680321d7dcf79b7ed7-exec 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684
  1. # axios
  2. [![npm version](https://img.shields.io/npm/v/axios.svg?style=flat-square)](https://www.npmjs.org/package/axios)
  3. [![build status](https://img.shields.io/travis/axios/axios.svg?style=flat-square)](https://travis-ci.org/axios/axios)
  4. [![code coverage](https://img.shields.io/coveralls/mzabriskie/axios.svg?style=flat-square)](https://coveralls.io/r/mzabriskie/axios)
  5. [![install size](https://packagephobia.now.sh/badge?p=axios)](https://packagephobia.now.sh/result?p=axios)
  6. [![npm downloads](https://img.shields.io/npm/dm/axios.svg?style=flat-square)](http://npm-stat.com/charts.html?package=axios)
  7. [![gitter chat](https://img.shields.io/gitter/room/mzabriskie/axios.svg?style=flat-square)](https://gitter.im/mzabriskie/axios)
  8. [![code helpers](https://www.codetriage.com/axios/axios/badges/users.svg)](https://www.codetriage.com/axios/axios)
  9. Promise based HTTP client for the browser and node.js
  10. ## Features
  11. - Make [XMLHttpRequests](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest) from the browser
  12. - Make [http](http://nodejs.org/api/http.html) requests from node.js
  13. - Supports the [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) API
  14. - Intercept request and response
  15. - Transform request and response data
  16. - Cancel requests
  17. - Automatic transforms for JSON data
  18. - Client side support for protecting against [XSRF](http://en.wikipedia.org/wiki/Cross-site_request_forgery)
  19. ## Browser Support
  20. ![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) |
  21. --- | --- | --- | --- | --- | --- |
  22. Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | 11 ✔ |
  23. [![Browser Matrix](https://saucelabs.com/open_sauce/build_matrix/axios.svg)](https://saucelabs.com/u/axios)
  24. ## Installing
  25. Using npm:
  26. ```bash
  27. $ npm install axios
  28. ```
  29. Using bower:
  30. ```bash
  31. $ bower install axios
  32. ```
  33. Using yarn:
  34. ```bash
  35. $ yarn add axios
  36. ```
  37. Using cdn:
  38. ```html
  39. <script src="https://unpkg.com/axios/dist/axios.min.js"></script>
  40. ```
  41. ## Example
  42. Performing a `GET` request
  43. ```js
  44. const axios = require('axios');
  45. // Make a request for a user with a given ID
  46. axios.get('/user?ID=12345')
  47. .then(function (response) {
  48. // handle success
  49. console.log(response);
  50. })
  51. .catch(function (error) {
  52. // handle error
  53. console.log(error);
  54. })
  55. .finally(function () {
  56. // always executed
  57. });
  58. // Optionally the request above could also be done as
  59. axios.get('/user', {
  60. params: {
  61. ID: 12345
  62. }
  63. })
  64. .then(function (response) {
  65. console.log(response);
  66. })
  67. .catch(function (error) {
  68. console.log(error);
  69. })
  70. .then(function () {
  71. // always executed
  72. });
  73. // Want to use async/await? Add the `async` keyword to your outer function/method.
  74. async function getUser() {
  75. try {
  76. const response = await axios.get('/user?ID=12345');
  77. console.log(response);
  78. } catch (error) {
  79. console.error(error);
  80. }
  81. }
  82. ```
  83. > **NOTE:** `async/await` is part of ECMAScript 2017 and is not supported in Internet
  84. > Explorer and older browsers, so use with caution.
  85. Performing a `POST` request
  86. ```js
  87. axios.post('/user', {
  88. firstName: 'Fred',
  89. lastName: 'Flintstone'
  90. })
  91. .then(function (response) {
  92. console.log(response);
  93. })
  94. .catch(function (error) {
  95. console.log(error);
  96. });
  97. ```
  98. Performing multiple concurrent requests
  99. ```js
  100. function getUserAccount() {
  101. return axios.get('/user/12345');
  102. }
  103. function getUserPermissions() {
  104. return axios.get('/user/12345/permissions');
  105. }
  106. axios.all([getUserAccount(), getUserPermissions()])
  107. .then(axios.spread(function (acct, perms) {
  108. // Both requests are now complete
  109. }));
  110. ```
  111. ## axios API
  112. Requests can be made by passing the relevant config to `axios`.
  113. ##### axios(config)
  114. ```js
  115. // Send a POST request
  116. axios({
  117. method: 'post',
  118. url: '/user/12345',
  119. data: {
  120. firstName: 'Fred',
  121. lastName: 'Flintstone'
  122. }
  123. });
  124. ```
  125. ```js
  126. // GET request for remote image
  127. axios({
  128. method: 'get',
  129. url: 'http://bit.ly/2mTM3nY',
  130. responseType: 'stream'
  131. })
  132. .then(function (response) {
  133. response.data.pipe(fs.createWriteStream('ada_lovelace.jpg'))
  134. });
  135. ```
  136. ##### axios(url[, config])
  137. ```js
  138. // Send a GET request (default method)
  139. axios('/user/12345');
  140. ```
  141. ### Request method aliases
  142. For convenience aliases have been provided for all supported request methods.
  143. ##### axios.request(config)
  144. ##### axios.get(url[, config])
  145. ##### axios.delete(url[, config])
  146. ##### axios.head(url[, config])
  147. ##### axios.options(url[, config])
  148. ##### axios.post(url[, data[, config]])
  149. ##### axios.put(url[, data[, config]])
  150. ##### axios.patch(url[, data[, config]])
  151. ###### NOTE
  152. When using the alias methods `url`, `method`, and `data` properties don't need to be specified in config.
  153. ### Concurrency
  154. Helper functions for dealing with concurrent requests.
  155. ##### axios.all(iterable)
  156. ##### axios.spread(callback)
  157. ### Creating an instance
  158. You can create a new instance of axios with a custom config.
  159. ##### axios.create([config])
  160. ```js
  161. const instance = axios.create({
  162. baseURL: 'https://some-domain.com/api/',
  163. timeout: 1000,
  164. headers: {'X-Custom-Header': 'foobar'}
  165. });
  166. ```
  167. ### Instance methods
  168. The available instance methods are listed below. The specified config will be merged with the instance config.
  169. ##### axios#request(config)
  170. ##### axios#get(url[, config])
  171. ##### axios#delete(url[, config])
  172. ##### axios#head(url[, config])
  173. ##### axios#options(url[, config])
  174. ##### axios#post(url[, data[, config]])
  175. ##### axios#put(url[, data[, config]])
  176. ##### axios#patch(url[, data[, config]])
  177. ##### axios#getUri([config])
  178. ## Request Config
  179. These are the available config options for making requests. Only the `url` is required. Requests will default to `GET` if `method` is not specified.
  180. ```js
  181. {
  182. // `url` is the server URL that will be used for the request
  183. url: '/user',
  184. // `method` is the request method to be used when making the request
  185. method: 'get', // default
  186. // `baseURL` will be prepended to `url` unless `url` is absolute.
  187. // It can be convenient to set `baseURL` for an instance of axios to pass relative URLs
  188. // to methods of that instance.
  189. baseURL: 'https://some-domain.com/api/',
  190. // `transformRequest` allows changes to the request data before it is sent to the server
  191. // This is only applicable for request methods 'PUT', 'POST', 'PATCH' and 'DELETE'
  192. // The last function in the array must return a string or an instance of Buffer, ArrayBuffer,
  193. // FormData or Stream
  194. // You may modify the headers object.
  195. transformRequest: [function (data, headers) {
  196. // Do whatever you want to transform the data
  197. return data;
  198. }],
  199. // `transformResponse` allows changes to the response data to be made before
  200. // it is passed to then/catch
  201. transformResponse: [function (data) {
  202. // Do whatever you want to transform the data
  203. return data;
  204. }],
  205. // `headers` are custom headers to be sent
  206. headers: {'X-Requested-With': 'XMLHttpRequest'},
  207. // `params` are the URL parameters to be sent with the request
  208. // Must be a plain object or a URLSearchParams object
  209. params: {
  210. ID: 12345
  211. },
  212. // `paramsSerializer` is an optional function in charge of serializing `params`
  213. // (e.g. https://www.npmjs.com/package/qs, http://api.jquery.com/jquery.param/)
  214. paramsSerializer: function (params) {
  215. return Qs.stringify(params, {arrayFormat: 'brackets'})
  216. },
  217. // `data` is the data to be sent as the request body
  218. // Only applicable for request methods 'PUT', 'POST', and 'PATCH'
  219. // When no `transformRequest` is set, must be of one of the following types:
  220. // - string, plain object, ArrayBuffer, ArrayBufferView, URLSearchParams
  221. // - Browser only: FormData, File, Blob
  222. // - Node only: Stream, Buffer
  223. data: {
  224. firstName: 'Fred'
  225. },
  226. // `timeout` specifies the number of milliseconds before the request times out.
  227. // If the request takes longer than `timeout`, the request will be aborted.
  228. timeout: 1000, // default is `0` (no timeout)
  229. // `withCredentials` indicates whether or not cross-site Access-Control requests
  230. // should be made using credentials
  231. withCredentials: false, // default
  232. // `adapter` allows custom handling of requests which makes testing easier.
  233. // Return a promise and supply a valid response (see lib/adapters/README.md).
  234. adapter: function (config) {
  235. /* ... */
  236. },
  237. // `auth` indicates that HTTP Basic auth should be used, and supplies credentials.
  238. // This will set an `Authorization` header, overwriting any existing
  239. // `Authorization` custom headers you have set using `headers`.
  240. // Please note that only HTTP Basic auth is configurable through this parameter.
  241. // For Bearer tokens and such, use `Authorization` custom headers instead.
  242. auth: {
  243. username: 'janedoe',
  244. password: 's00pers3cret'
  245. },
  246. // `responseType` indicates the type of data that the server will respond with
  247. // options are: 'arraybuffer', 'document', 'json', 'text', 'stream'
  248. // browser only: 'blob'
  249. responseType: 'json', // default
  250. // `responseEncoding` indicates encoding to use for decoding responses
  251. // Note: Ignored for `responseType` of 'stream' or client-side requests
  252. responseEncoding: 'utf8', // default
  253. // `xsrfCookieName` is the name of the cookie to use as a value for xsrf token
  254. xsrfCookieName: 'XSRF-TOKEN', // default
  255. // `xsrfHeaderName` is the name of the http header that carries the xsrf token value
  256. xsrfHeaderName: 'X-XSRF-TOKEN', // default
  257. // `onUploadProgress` allows handling of progress events for uploads
  258. onUploadProgress: function (progressEvent) {
  259. // Do whatever you want with the native progress event
  260. },
  261. // `onDownloadProgress` allows handling of progress events for downloads
  262. onDownloadProgress: function (progressEvent) {
  263. // Do whatever you want with the native progress event
  264. },
  265. // `maxContentLength` defines the max size of the http response content in bytes allowed
  266. maxContentLength: 2000,
  267. // `validateStatus` defines whether to resolve or reject the promise for a given
  268. // HTTP response status code. If `validateStatus` returns `true` (or is set to `null`
  269. // or `undefined`), the promise will be resolved; otherwise, the promise will be
  270. // rejected.
  271. validateStatus: function (status) {
  272. return status >= 200 && status < 300; // default
  273. },
  274. // `maxRedirects` defines the maximum number of redirects to follow in node.js.
  275. // If set to 0, no redirects will be followed.
  276. maxRedirects: 5, // default
  277. // `socketPath` defines a UNIX Socket to be used in node.js.
  278. // e.g. '/var/run/docker.sock' to send requests to the docker daemon.
  279. // Only either `socketPath` or `proxy` can be specified.
  280. // If both are specified, `socketPath` is used.
  281. socketPath: null, // default
  282. // `httpAgent` and `httpsAgent` define a custom agent to be used when performing http
  283. // and https requests, respectively, in node.js. This allows options to be added like
  284. // `keepAlive` that are not enabled by default.
  285. httpAgent: new http.Agent({ keepAlive: true }),
  286. httpsAgent: new https.Agent({ keepAlive: true }),
  287. // 'proxy' defines the hostname and port of the proxy server.
  288. // You can also define your proxy using the conventional `http_proxy` and
  289. // `https_proxy` environment variables. If you are using environment variables
  290. // for your proxy configuration, you can also define a `no_proxy` environment
  291. // variable as a comma-separated list of domains that should not be proxied.
  292. // Use `false` to disable proxies, ignoring environment variables.
  293. // `auth` indicates that HTTP Basic auth should be used to connect to the proxy, and
  294. // supplies credentials.
  295. // This will set an `Proxy-Authorization` header, overwriting any existing
  296. // `Proxy-Authorization` custom headers you have set using `headers`.
  297. proxy: {
  298. host: '127.0.0.1',
  299. port: 9000,
  300. auth: {
  301. username: 'mikeymike',
  302. password: 'rapunz3l'
  303. }
  304. },
  305. // `cancelToken` specifies a cancel token that can be used to cancel the request
  306. // (see Cancellation section below for details)
  307. cancelToken: new CancelToken(function (cancel) {
  308. })
  309. }
  310. ```
  311. ## Response Schema
  312. The response for a request contains the following information.
  313. ```js
  314. {
  315. // `data` is the response that was provided by the server
  316. data: {},
  317. // `status` is the HTTP status code from the server response
  318. status: 200,
  319. // `statusText` is the HTTP status message from the server response
  320. statusText: 'OK',
  321. // `headers` the headers that the server responded with
  322. // All header names are lower cased
  323. headers: {},
  324. // `config` is the config that was provided to `axios` for the request
  325. config: {},
  326. // `request` is the request that generated this response
  327. // It is the last ClientRequest instance in node.js (in redirects)
  328. // and an XMLHttpRequest instance the browser
  329. request: {}
  330. }
  331. ```
  332. When using `then`, you will receive the response as follows:
  333. ```js
  334. axios.get('/user/12345')
  335. .then(function (response) {
  336. console.log(response.data);
  337. console.log(response.status);
  338. console.log(response.statusText);
  339. console.log(response.headers);
  340. console.log(response.config);
  341. });
  342. ```
  343. When 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.
  344. ## Config Defaults
  345. You can specify config defaults that will be applied to every request.
  346. ### Global axios defaults
  347. ```js
  348. axios.defaults.baseURL = 'https://api.example.com';
  349. axios.defaults.headers.common['Authorization'] = AUTH_TOKEN;
  350. axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded';
  351. ```
  352. ### Custom instance defaults
  353. ```js
  354. // Set config defaults when creating the instance
  355. const instance = axios.create({
  356. baseURL: 'https://api.example.com'
  357. });
  358. // Alter defaults after instance has been created
  359. instance.defaults.headers.common['Authorization'] = AUTH_TOKEN;
  360. ```
  361. ### Config order of precedence
  362. Config 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.
  363. ```js
  364. // Create an instance using the config defaults provided by the library
  365. // At this point the timeout config value is `0` as is the default for the library
  366. const instance = axios.create();
  367. // Override timeout default for the library
  368. // Now all requests using this instance will wait 2.5 seconds before timing out
  369. instance.defaults.timeout = 2500;
  370. // Override timeout for this request as it's known to take a long time
  371. instance.get('/longRequest', {
  372. timeout: 5000
  373. });
  374. ```
  375. ## Interceptors
  376. You can intercept requests or responses before they are handled by `then` or `catch`.
  377. ```js
  378. // Add a request interceptor
  379. axios.interceptors.request.use(function (config) {
  380. // Do something before request is sent
  381. return config;
  382. }, function (error) {
  383. // Do something with request error
  384. return Promise.reject(error);
  385. });
  386. // Add a response interceptor
  387. axios.interceptors.response.use(function (response) {
  388. // Do something with response data
  389. return response;
  390. }, function (error) {
  391. // Do something with response error
  392. return Promise.reject(error);
  393. });
  394. ```
  395. If you may need to remove an interceptor later you can.
  396. ```js
  397. const myInterceptor = axios.interceptors.request.use(function () {/*...*/});
  398. axios.interceptors.request.eject(myInterceptor);
  399. ```
  400. You can add interceptors to a custom instance of axios.
  401. ```js
  402. const instance = axios.create();
  403. instance.interceptors.request.use(function () {/*...*/});
  404. ```
  405. ## Handling Errors
  406. ```js
  407. axios.get('/user/12345')
  408. .catch(function (error) {
  409. if (error.response) {
  410. // The request was made and the server responded with a status code
  411. // that falls out of the range of 2xx
  412. console.log(error.response.data);
  413. console.log(error.response.status);
  414. console.log(error.response.headers);
  415. } else if (error.request) {
  416. // The request was made but no response was received
  417. // `error.request` is an instance of XMLHttpRequest in the browser and an instance of
  418. // http.ClientRequest in node.js
  419. console.log(error.request);
  420. } else {
  421. // Something happened in setting up the request that triggered an Error
  422. console.log('Error', error.message);
  423. }
  424. console.log(error.config);
  425. });
  426. ```
  427. You can define a custom HTTP status code error range using the `validateStatus` config option.
  428. ```js
  429. axios.get('/user/12345', {
  430. validateStatus: function (status) {
  431. return status < 500; // Reject only if the status code is greater than or equal to 500
  432. }
  433. })
  434. ```
  435. ## Cancellation
  436. You can cancel a request using a *cancel token*.
  437. > The axios cancel token API is based on the withdrawn [cancelable promises proposal](https://github.com/tc39/proposal-cancelable-promises).
  438. You can create a cancel token using the `CancelToken.source` factory as shown below:
  439. ```js
  440. const CancelToken = axios.CancelToken;
  441. const source = CancelToken.source();
  442. axios.get('/user/12345', {
  443. cancelToken: source.token
  444. }).catch(function (thrown) {
  445. if (axios.isCancel(thrown)) {
  446. console.log('Request canceled', thrown.message);
  447. } else {
  448. // handle error
  449. }
  450. });
  451. axios.post('/user/12345', {
  452. name: 'new name'
  453. }, {
  454. cancelToken: source.token
  455. })
  456. // cancel the request (the message parameter is optional)
  457. source.cancel('Operation canceled by the user.');
  458. ```
  459. You can also create a cancel token by passing an executor function to the `CancelToken` constructor:
  460. ```js
  461. const CancelToken = axios.CancelToken;
  462. let cancel;
  463. axios.get('/user/12345', {
  464. cancelToken: new CancelToken(function executor(c) {
  465. // An executor function receives a cancel function as a parameter
  466. cancel = c;
  467. })
  468. });
  469. // cancel the request
  470. cancel();
  471. ```
  472. > Note: you can cancel several requests with the same cancel token.
  473. ## Using application/x-www-form-urlencoded format
  474. By 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.
  475. ### Browser
  476. In a browser, you can use the [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) API as follows:
  477. ```js
  478. const params = new URLSearchParams();
  479. params.append('param1', 'value1');
  480. params.append('param2', 'value2');
  481. axios.post('/foo', params);
  482. ```
  483. > 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).
  484. Alternatively, you can encode data using the [`qs`](https://github.com/ljharb/qs) library:
  485. ```js
  486. const qs = require('qs');
  487. axios.post('/foo', qs.stringify({ 'bar': 123 }));
  488. ```
  489. Or in another way (ES6),
  490. ```js
  491. import qs from 'qs';
  492. const data = { 'bar': 123 };
  493. const options = {
  494. method: 'POST',
  495. headers: { 'content-type': 'application/x-www-form-urlencoded' },
  496. data: qs.stringify(data),
  497. url,
  498. };
  499. axios(options);
  500. ```
  501. ### Node.js
  502. In node.js, you can use the [`querystring`](https://nodejs.org/api/querystring.html) module as follows:
  503. ```js
  504. const querystring = require('querystring');
  505. axios.post('http://something.com/', querystring.stringify({ foo: 'bar' }));
  506. ```
  507. You can also use the [`qs`](https://github.com/ljharb/qs) library.
  508. ###### NOTE
  509. The `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).
  510. ## Semver
  511. Until 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.
  512. ## Promises
  513. axios depends on a native ES6 Promise implementation to be [supported](http://caniuse.com/promises).
  514. If your environment doesn't support ES6 Promises, you can [polyfill](https://github.com/jakearchibald/es6-promise).
  515. ## TypeScript
  516. axios includes [TypeScript](http://typescriptlang.org) definitions.
  517. ```typescript
  518. import axios from 'axios';
  519. axios.get('/user?ID=12345');
  520. ```
  521. ## Resources
  522. * [Changelog](https://github.com/axios/axios/blob/master/CHANGELOG.md)
  523. * [Upgrade Guide](https://github.com/axios/axios/blob/master/UPGRADE_GUIDE.md)
  524. * [Ecosystem](https://github.com/axios/axios/blob/master/ECOSYSTEM.md)
  525. * [Contributing Guide](https://github.com/axios/axios/blob/master/CONTRIBUTING.md)
  526. * [Code of Conduct](https://github.com/axios/axios/blob/master/CODE_OF_CONDUCT.md)
  527. ## Credits
  528. axios 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.
  529. ## License
  530. MIT