More progress, committing to get assistance with TS

This commit is contained in:
Dane Everitt 2018-12-29 15:51:13 -08:00
parent a76bde5b1d
commit ed5ebe9155
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
8 changed files with 45 additions and 27 deletions

View file

@ -1,23 +0,0 @@
import axios from 'axios';
// This token is set in the bootstrap.js file at the beginning of the request
// and is carried through from there.
// const token: string = '';
const http = axios.create({
'X-Requested-With': 'XMLHttpRequest',
'Accept': 'application/json',
'Content-Type': 'application/json',
});
// If we have a phpdebugbar instance registered at this point in time go
// ahead and route the response data through to it so things show up.
if (typeof window.phpdebugbar !== 'undefined') {
http.interceptors.response.use(response => {
window.phpdebugbar.ajaxHandler.handle(response.request);
return response;
});
}
export default http;