Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

135
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!