Created
November 10, 2017 08:21
-
-
Save Gimcrack/081b34bc186b6b61fa98dcad8cce74d8 to your computer and use it in GitHub Desktop.
Api.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default { | |
prefix : 'api/v1/', | |
get(url, data) { | |
return axios.get( this.prefix + url, data ) | |
}, | |
post(url, data) { | |
return axios.post( this.prefix + url, data ) | |
}, | |
patch(url, data) { | |
return axios.patch( this.prefix + url, data ) | |
}, | |
put(url, data) { | |
return axios.put( this.prefix + url, data ) | |
}, | |
delete(url, data) { | |
return axios.delete( this.prefix + url, data ) | |
}, | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment