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

205
Visualizações
How can I allow all setRequestHeader in Ajax?

I am developing an application where I would like to allow my setRequestHeader to accept all file types. I'm trying to send via POST two input values, one of the text type and the other of the file type, but I'm only allowing one of the two.

my code:

 var xml = new XMLHttpRequest();
 xml.open("POST", url, true);
 xml.setRequestHeader('Accept', 'multipart/form-data');
 //xml.setRequestHeader('Content-Type', 'application\/x-www-form-urlencoded');
 xml.onloadend = response;
 xml.send(send);

How can I set the setRequestHeader to allow all file types or at least the ones I need which is text and file type, is there a specific setRequestHeader for that?

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