Last active
June 12, 2021 10:32
-
-
Save JaysonChiang/1e47863c9eb7ed456ad43b16d03e1e01 to your computer and use it in GitHub Desktop.
basic api.ts
This file contains 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
import axios from 'axios'; | |
axios.defaults.baseURL = 'https://jsonplaceholder.typicode.com'; | |
const api = { | |
getData: () => axios.get('/todos/1') | |
}; | |
export default api; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment