Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

80
Visualizações
Cannot able to see the AJAX Request Header in chrome Inspect

I'm developing a java based web application. In my application, there are some data that needs to be fetched without page reload. So, I'm using AJAX in jquery framework.

Note: I'm using tomcat web server

$(document).ready(AjaxFunction);

function AjaxFunction(){
    
    $.ajax({
        type: "GET",
        url : "/DemoApp/sampleData.txt",
        beforeSend: function(xhr){
            xhr.setRequestHeader("some-custom-header","my-name");
        },
        //headers: { 'some-custom-header': 'myname' },
        success : function(){
            console.log("Working !!!");
        },
        complete : function(){
            setTimeout(AjaxFunction, 5000);
        }
    });
}

Actually the ajax request is successful. But when I try to inspect the request header using the chrome developer tools, I cannot able to find the Request header.

Expected behaviour: Here we can see that, Request headers is available for dropArea.html

I expect the same for sampleData.txt Expected Behaviour

Actual behaviour: Here, Request headers is not available for sampleData.txt Actual Behaviour

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda