ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Axios Snippets

by cvhau ALL

A collections of [axios](https://github.com/axios/axios) API snippets for [Sublime Text](http://www.sublimetext.com)

Details

Installs

  • Total 703
  • Win 479
  • Mac 97
  • Linux 127
Jul 27 Jul 26 Jul 25 Jul 24 Jul 23 Jul 22 Jul 21 Jul 20 Jul 19 Jul 18 Jul 17 Jul 16 Jul 15 Jul 14 Jul 13 Jul 12 Jul 11 Jul 10 Jul 9 Jul 8 Jul 7 Jul 6 Jul 5 Jul 4 Jul 3 Jul 2 Jul 1 Jun 30 Jun 29 Jun 28 Jun 27 Jun 26 Jun 25 Jun 24 Jun 23 Jun 22 Jun 21 Jun 20 Jun 19 Jun 18 Jun 17 Jun 16 Jun 15 Jun 14 Jun 13 Jun 12
Windows 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 0 2 0 0 0 0 0 0 1
Mac 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Linux 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0

Readme

Source
raw.​githubusercontent.​com

Axios Snippets For Sublime Text

This is a collection of axios API snippets for Sublime Text

Installation

Use Sublime Text's Package Control (Preferences -> Package Control -> Install Package -> Axios Snippets) to install this package.

Snippets

  • axios
axios({
    method: 'get',
    url: '',
  }).then((response) => {
    // TODO
  }).catch((error) => {
    console.error(error);
  }).finally(() => {
    // TODO
  });
  • axios.request | axiosr
axios.request({
    method: 'get',
    url: '',
  }).then((response) => {
    // TODO
  }).catch((error) => {
    console.error(error);
  }).finally(() => {
    // TODO
  });
  • axios.get | axiosge
axios.get('url', {
    params: {
      key: 'value',
    },
  }).then((response) => {
    // TODO
  }).catch((error) => {
    console.error(error);
  }).finally(() => {
    // TODO
  });
  • axios.delete | axiosde
axios.delete('url').then((response) => {
    // TODO
  }).catch((error) => {
    console.error(error);
  }).finally(() => {
    // TODO
  });
  • axios.head | axioshe
axios.head('url').then((response) => {
    // TODO
  }).catch((error) => {
    console.error(error);
  }).finally(() => {
    // TODO
  });
  • axios.options | axiosop
axios.options('url').then((response) => {
    // TODO
  }).catch((error) => {
    console.error(error);
  }).finally(() => {
    // TODO
  });
  • axios.post | axiospo
axios.post('url', {
    key: 'value',
  }).then((response) => {
    // TODO
  }).catch((error) => {
    console.error(error);
  }).finally(() => {
    // TODO
  });
  • axios.put | axiospu
axios.put('url', {
    key: 'value',
  }).then((response) => {
    // TODO
  }).catch((error) => {
    console.error(error);
  }).finally(() => {
    // TODO
  });
  • axios.patch | axiospa
axios.patch('url', {
    key: 'value',
  }).then((response) => {
    // TODO
  }).catch((error) => {
    console.error(error);
  }).finally(() => {
    // TODO
  });
  • axios.create | axioscr
axios.create({
    baseURL: 'base-url',
    timeout: 5000,
    headers: {
      'X-Requested-With': 'XMLHttpRequest',
    }
  });

 

Also support some Promise commands
  • promise new | Promise new.
new Promise((resolve, reject) => {
    // TODO
  });
  • promise | Promise
Promise((resolve, reject) => {
    // TODO
  });

Contributions

If you have any ideas and new features, please fork and create a pull request to repository.