Co-authored-by: Joren Broekema <Joren.Broekema@ing.com> Co-authored-by: Alex Ghiu <Alex.Ghiu@ing.com> Co-authored-by: Thijs Louisse <Thijs.Louisse@ing.com>
26 lines
553 B
Markdown
26 lines
553 B
Markdown
# Ajax
|
|
|
|
[//]: # 'AUTO INSERT HEADER PREPUBLISH'
|
|
|
|
`ajax` is the global manager for handling all ajax requests.
|
|
It is a promise based system for fetching data, based on [axios](https://github.com/axios/axios)
|
|
|
|
## Live Demo/Documentation
|
|
|
|
> See our [storybook](http://lion-web-components.netlify.com/?path=/docs/fetch-system-ajax) for a live demo and documentation
|
|
|
|
## How to use
|
|
|
|
### Installation
|
|
|
|
```sh
|
|
npm i --save @lion/ajax
|
|
```
|
|
|
|
### Example
|
|
|
|
```js
|
|
import { ajax } from '@lion/ajax';
|
|
|
|
ajax.get('data.json').then(response => console.log(response));
|
|
```
|