    withCredentials: false
    },
    beforeSend: function(request){
        request.setRequestHeader('Authorization','Bearer '+window.token.access_token);
    },
    headers:{
        'Content-Type': contenttype
    },
    dataType: datatype,
    success: function(data) {
        if(data){
        ...
        }
    },
    error: function(jqXHR, textStatus, errorThrown) {
            document.getElementById("output_"+count).innerHTML = jqXHR.status+" : "+jqXHR.statusText;
    },
});</code></pre>
           