### Http methods

Add import {Http} from 'ace-js' to your component, then
GET
Http.get(url).then(response=>{ })
Example:
City:
Temp: C
Wind: m/s
POST
Http.post(url, params).then(response=>{ })
PUT
Http.put(url, params).then(response=>{ })
DELETE
Http.delete(url).then(response=>{ })
Interceptors
In your code you can use interceptors to add your own logic
example.component.js

            import { Component, Http } from 'ace-js';
            import Tpl from './root.component.html';
            import NotificaitonsStore from 'stores/notifications.store';
            import UserStore from 'stores/user.store'
            export class ExampleComponent extends Component {
                constructor(params) {
                    super(params, {
                        template: Tpl
                    });
                }

                onInit() {
                    Http.getCatalog('/catalog');
                    Http.onProgress(event => {
                        console.log(event.loaded + ' / ' + event.total);
                    });
                    Http.onError(err => {
                        switch (err.status) {
                          case 401:
                            UserStore.logout('auth');
                            break;
                          case 406:
                            NotificaitonsStore.show({ type: 'error', text: err.response.message });
                            UserStore.logout('auth');
                            break;
                          case 422:
                            break;
                          case 404:
                            break;
                          case 403:

                            break;
                          case 500:
                          case 502:
                            break;
                          default:

                            break;
                        }
                    });
                }
            }