Created
September 11, 2018 13:43
-
-
Save kuroski/9252d7c2cc4613bdf35972ead5e1c41d to your computer and use it in GitHub Desktop.
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
import axios from 'axios' | |
import httpAdapter from 'axios/lib/adapters/http' | |
const instance = axios.create({ | |
baseURL: 'https://api.github.com', | |
adapter: httpAdapter, | |
}) | |
export default { | |
searchUser(username) { | |
return instance | |
.get(`/users/${username}`) | |
.then(result => result.data) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment