Last active
January 27, 2018 01:55
-
-
Save wwwmarcos/b457634f632a69dcbab847bb89b45021 to your computer and use it in GitHub Desktop.
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
// services/http.js | |
import axios from 'axios' | |
import storage from './storage' | |
const transformResponse = (data) => { | |
// faça o que quiser aqui | |
return data | |
} | |
const configuredAxios = axios.create({ | |
baseURL: 'https://dogs.com/', | |
headers: {'X-Custom-Header': 'foobar'}, | |
transformResponse: [transformResponse] | |
}) | |
export default configuredAxios |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment