Axios Snippets
A collections of [axios](https://github.com/axios/axios) API snippets for [Sublime Text](http://www.sublimetext.com)
Details
Installs
- Total 744
- Win 509
- Mac 103
- Linux 132
May 7 | May 6 | May 5 | May 4 | May 3 | May 2 | May 1 | Apr 30 | Apr 29 | Apr 28 | Apr 27 | Apr 26 | Apr 25 | Apr 24 | Apr 23 | Apr 22 | Apr 21 | Apr 20 | 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 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 0 | 0 | 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 | 1 | 0 | 1 | 0 | 0 |
Mac | 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 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Linux | 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 | 0 | 0 | 1 |
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.