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
[ | |
{ | |
"installDate": 1525867299186, | |
"enabled": true, | |
"updateUrl": "https://userstyles.org/styles/chrome/37035.json", | |
"md5Url": "https://update.userstyles.org/37035.md5", | |
"url": "http://userstyles.org/styles/37035", | |
"originalMd5": "3b8956d9374a8accab2a3cf1417dcd87", | |
"sections": [ | |
{ |
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
<html> | |
<head> | |
<title>CSR BRO</title> | |
</head> | |
<body> | |
<div id="root"></div> | |
</body> | |
<script src="frameworkscript.js"></script> | |
<script src="bundle.js"></script> | |
</html> |
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 transformRequest = (data, headers) => { | |
headers['x-api-token'] = storage.getToken() | |
return data | |
} |
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 | |
} |
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
// component.js | |
import http from './services/http' | |
http({ | |
method: 'GET', | |
url: '/cute' | |
}) | |
.then(cuteDog => console.log(cuteDog.data)) |
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' | |
const configuredAxios = axios.create({ | |
baseURL: 'https://dogs.com/', | |
headers: {'X-Custom-Header': 'foobar'} | |
}) | |
export default configuredAxios |
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' | |
export default axios |
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({ | |
method:'get', | |
url:'http://dogs.com' | |
}) | |
.then(dogs => console.log(dogs.data)) |
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 http from '../../services/http' | |
http({ | |
method: 'GET', | |
url: '/cars' | |
}) | |
.then(data => console.log(data)) | |
// GET http://localhost:3006/cars |
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
{ | |
"name": "Marcos Florencio", | |
"github": "https://github.com/eptaccio", | |
"twitter": "https://twitter.com/eptaccio", | |
"linkedin": "https://www.linkedin.com/in/eptaccio", | |
"telegram": "https://telegram.me/eptaccio", | |
"email": "[email protected]", | |
"medium": "https://medium.com/@eptaccio" | |
} |