Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- axiosTest() {
- return axios.get(url).then(response => {
- // returning the data here allows the caller to get it through another .then(...)
- return response.data
- })
- }
- axiosTest().then(data => {
- response.json({ message: 'Request received!', data })
- })
Add Comment
Please, Sign In to add comment