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

137
Visualizações
FormData.append() appears to not be adding items

I am working on a project using Angular and Node for a job I am training for and am currently stuck trying to fix what appears to be my own misunderstanding of the FormData data type. I have isolated the problem to the following code:

const postData = new FormData();
        postData.append("title", title);
        postData.append("content", content);
        this.http
          .post<{ message: string; post: Post }>(
            "http://localhost:3000/api/posts",
            postData
          )

Before this code is run, the variables that supply the data to the FormData contain the correct information, but on the backend the parameters come up undefined. Attempts to peer into the FormData are causing CORS errors that appear in no other contexts. Any help either letting me see into the FormData, better verifying what is happening on the backend, or using FormData in general would be appreciated.

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