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 688
  • Win 468
  • Mac 95
  • Linux 125
Apr 19 Apr 18 Apr 17 Apr 16 Apr 15 Apr 14 Apr 13 Apr 12 Apr 11 Apr 10 Apr 9 Apr 8 Apr 7 Apr 6 Apr 5 Apr 4 Apr 3 Apr 2 Apr 1 Mar 31 Mar 30 Mar 29 Mar 28 Mar 27 Mar 26 Mar 25 Mar 24 Mar 23 Mar 22 Mar 21 Mar 20 Mar 19 Mar 18 Mar 17 Mar 16 Mar 15 Mar 14 Mar 13 Mar 12 Mar 11 Mar 10 Mar 9 Mar 8 Mar 7 Mar 6
Windows 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 2 0 0 1 0 0 0 0 0 0 0 0 0 2
Mac 0 0 0 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
Linux 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 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 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.