function authHeaders(xhr) {
    if (window.localStorage.getItem("authtoken") !== null) {
        var authToken = window.localStorage.getItem("authtoken");
        xhr.setRequestHeader("Authorization", "Basic " + authToken);
    }
}
// Set the auth header if necessary
Set the auth header if necessary
Set the auth header if necessary
function authHeaders(xhr) {
    if (window.localStorage.getItem("authtoken") !== null) {
        var authToken = window.localStorage.getItem("authtoken");
        xhr.setRequestHeader("Authorization", "Basic " + authToken);
    }
}
function authHeaders ( xhr ) { if ( window . localStorage . getItem ( "authtoken" ) !== null ) { var authToken = window . localStorage . getItem ( "authtoken" ) ; xhr . setRequestHeader ( "Authorization" , "Basic " + authToken ) ; } }
Set the auth header if necessary
Set the auth header if necessary