Good afternoon, I have the following piece of code:
function getData(){
var url = "http://teste.com";
var data = "";
$.get(url, function(response){
serverResponse = response;
for(i in response.content){
data +='\
<tr>\
<td>'+response.content[i].TesteId+'</td>\
<td>'+response.content[i].TesteNome+'</td>\
<td>'+response.content[i].TesteEmail+'</td>\
</tr>';
}
$('#corpotabela').empty();
$('#corpotabela').append(data);
var width = new Array();
$(".table-body tr:eq(0)").find('td').each(function (position){
width[position] = $(this).outerWidth();
});
$(".table-header tr").find('th').each(function (position){
$(this).css("width", width[position]+2);
});
});
}
However, to get this request I need to send a token in the header. Can I do this using this jQuery method?